untrack
Removes tracked files that match .gitignore exclusion rules.
Usage
git-wrangler untrack
This command takes no arguments.
What it does
Removes files from the Git index that are actively tracked but match exclusion rules in .gitignore. It untracks the files safely while leaving them on the local disk, and commits the removals automatically.
This is typically needed when you:
- Added an entry to
.gitignoreafter a file was already committed - Want to enforce ignoring without deleting the local file
Example
git-wrangler untrack
Notes
- Files are not deleted from disk — they are only removed from the Git index
- The untracking is committed automatically with the message
"Stop tracking files defined in .gitignore" - Repositories without a
.gitignoreare skipped - Repositories where no tracked files match
.gitignoreare skipped cleanly