You can edit the current worktree’s .gitignore inside the app, or right-click an untracked file to add a pattern directly.
Editing the file directly
Click the Edit .gitignore button at the right of the History tab header to open the dedicated tab.
Edit patterns using Git’s .gitignore syntax, and clicking Save updates the Working copy state to match the new rules.
Adding a pattern from an untracked file
Right-click an untracked file (green + badge) in the Working copy panel and open the Add to .gitignore submenu.
Depending on the path, the following candidates appear.
- This file only uses the pattern
/path/filename.
- All
*.ext in this folder uses the pattern /path/*.ext.
- All
*.ext uses the pattern *.ext.
- This entire folder uses the pattern
/path/.
For files with no extension, the 2 extension candidates are omitted; for files at the repository root, This entire folder is omitted.
Selecting an item appends the pattern to the end of .gitignore, without duplicates.
.gitignore only applies to files that are not yet tracked.
Adding a rule for an already-tracked file does not untrack it.