You may want to avoid committing certain files or folders, as well as showing them as untracked. In this case, you can add these files or folders to a repository’s ignore list file.
Ignoring Files
To add a particular file to the ignore list:
-
Open the Commit dialog. You can do one of the following to display it:
- Select File | Source Control | Commit from the TestComplete main menu.
- Right-click within the Project Explorer and choose Source Control | Commit from the context menu.
- Click Commit on the Source Control toolbar (if the toolbar is hidden, right-click the main menu and select Source Control in the ensuing context menu to show the toolbar).
-
Right-click the desired untracked file and choose Add to ignore list from the context menu.
Adding a file to the ignore list via the TestComplete Commit dialog
Adding a file to the ignore list via TortoiseGit’s Commit dialog
These actions will add the exact particular file to the repository’s ignore list file.
Ignoring Folders and Filename Patterns
You can also ignore entire folders, as well as multiple files that match the predefined pattern. Your actions on adding folders and file patterns to the repository’s ignore list will vary depending on whether you use the TortoiseGit client or not.
If you use TortoiseGit, then you can add folders and file patterns to the ignore list in the same manner as ignoring particular files. Just select the folder name or filename pattern from the context menu of the Commit dialog.
If you do not use TortoiseGit, then you will need to edit the repository’s ignore list manually.
To edit the repository’s ignore list file from TestComplete:
- Open the Git Repository Settings dialog. You can do one of the following to display it:
- Select File | Source Control | Settings from the TestComplete main menu.
- Right-click within the Project Explorer and choose Source Control | Settings from the context menu.
- Click Settings on the Source Control toolbar (if the toolbar is hidden, right-click the main menu and select Source Control in the ensuing context menu to show the toolbar).
- Click the Edit button next to the Ignore File field.
- In the ensuing editor, modify the ignore list as needed, and then click the Save button.
For details on the syntax of ignore list files, see http://git-scm.com/docs/gitignore.
Alternatively, you may edit the repository’s ignore list with whatever text editor you prefer. The ignore list file has the .gitignore name and resides in the repository folder.
Related Tasks
See Also
Integration With Git - Common Tasks
Integration With Git - Overview