Ignoring Certain Files And Folders

Applies to TestComplete 14.92, last modified on September 16, 2021

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 specific file to the ignore list:

  1. 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).

  2. 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 file to the ignore list via the TestComplete Commit dialog

    Click the image to enlarge it.

    Adding a file to the ignore list via TortoiseGit Commit dialog

    Adding file to the ignore list via TortoiseGit Commit dialog

    Click the image to enlarge it.

These actions will add this specific 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 specific 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:

  1. 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).

  2. Click the Edit button to the right of the Ignore File field.

    Source control settings

    Click the image to enlarge it.

  3. Specify the patterns of the files and folders to ignore. For details about the pattern format, see https://git-scm.com/docs/gitignore.

    Ignore file edit
  4. Click Save.

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

Highlight search results