Generating gitignore Files
By default, Git does not allow you to commit empty folders. To keep track of empty folders in the repository, Git allows you to add .gitignore file in such folders and then commit into the repository.
.gitignore
file.
Generating gitignore Files in Special Folders
- Procedure
- In the Project Explorer view, right-click on the project and select .
- In the Share Project dialog, select Git and click Next.
- In the
Configure Git Repository dialog, either create a new Git repository or select an existing Git repository from a drop-down list.
- Click
Finish to share the project.
As special folders are empty, you see warnings in the Problems tab.
- Expand the warning header to display list of warnings. Select any one warning, right-click and select
Quick Fix.
The Quick Fix dialog opens. In the Select a fix section, Create .gitignore file on empty folder option is selected. List of Resource folders is displayed along with the Location in the Problems section on the dialog.
- Click
Select All to select all checkboxes for the resources.
- Click Finish to generate .gitignore files in the special folders.
- The .gitignore files generated in special folders are visible in the
Navigator view only. To open Navigator view, select
.
Show View dialog is displayed.
- Select
Ok.
and click
Generating gitignore Files at Application Module Level
- Procedure
- Select menu.
- Select the
Create .gitignore file for new BW projects. checkbox. Click
Ok.
When you create a new application module, in the Navigator view, select the application module name, right-click and select Refresh to see the
.gitignore
file generated.Note: This method generates .gitignore file at the root level only.