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.

In TIBCO Business Studio™ for BusinessWorks™ when you create an application module, it contains Service Descriptors, Resources, Schemas, and Policies as empty folders. Once you configure EGit plug-in with TIBCO Business Studio for BusinessWorks, you can generate .gitignore file.

Generating gitignore Files in Special Folders

Prerequisites

EGit plug-in is configured with TIBCO Business Studio for BusinessWorks and you created an application module.

Procedure

  1. In the Project Explorer view, right-click on the project and select Team > Share Project....
  2. In the Share Project dialog box, select Git and click Next.
  3. In the Configure Git Repository dialog box, either create a new Git repository or select an existing Git repository from a drop down list.
  4. Click Finish to share the project.
    As special folders are empty, you see warnings in the Problems tab.
  5. Expand the warning header to display list of warnings. Select any one warning, right-click and select Quick Fix.
    The Quick Fix dialog box 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 box.
  6. Click Select All to select all check boxes for the resources.

  7. Click Finish to generate .gitignore files in the special folders.
  8. The .gitignore files generated in special folders are visible in the Navigator view only. To open Navigator view, select Window > Show View > Other....
    Show View dialog box is displayed.
  9. Select General > Navigator and click Ok.

Generating gitignore Files at Application Module Level

You can generate .gitignore file when creating a new application module.

Procedure

  1. Select Window > Preferences > BusinessWorks > Team Development menu.
  2. Select the Create .gitignore file for new BW projects. check box. 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.