Tower Icon

Ignoring Files

In many projects you'll have files that you don't want Git to track, i.e. files that you want to be excluded from version control.

When you ignore a file you can determine if this decision should be synced with remote repositories. This means that when other people clone or update from this repository, the specified file will be ignored on their machines, too. If you don't want this behaviour but only need the files ignored on your local machine you can add them to your local exclude list (all corresponding dialogs contain an "exclude" option).

NOTE:Git doesn't ignore files that are already tracked (files that are already known to Git and under version control). In such a case the file must be untracked (and committed) before it disappears from the file lists. However, as a convenience, the corresponding ignore dialogs in Tower offer you to untrack and ignore the file in one go.

To ignore a file

  • Ignore a specific file: In cases where you want to ignore a concrete file you can choose "Ignore <file name>..." (from the contextual menu in the file list). The file's exact path will then be ignored.

  • Ignore all files with a certain name / pattern: If you want to ignore a file regardless of its exact path you should choose "Ignore Files Like This...". In the following dialog a pattern must be entered that matches the files you want to ignore.

To edit ignore patterns manually

Git remembers which files you want ignored by saving the naming patterns in special files (most notably ".gitignore" and "exclude"). If you want to change these patterns - e.g. to stop ignoring a file or to enter new patterns by hand - you can select "Edit Ignored File Patterns" or "Edit Exclude File Patterns" from the "File" main menu. Tower then opens the corresponding text file in an external editor for you.

NOTE: If you enable "Show ignored files in Status 'All' view" in Tower's preferences, ignored files are displayed (only in Status "All") and will appear grayed out.

Related Topics

Overview of the Status area

Undoing Changes