git update-index
CautionIgnore local edits to tracked files
git update-index --skip-worktree <file>
Hides local edits to tracked files — the classic trick for per-machine configs. Easy to forget you set it.
Examples
git ls-files -v | grep ^SList skip-worktree files
Syntax
git update-index --skip-worktree|--no-skip-worktree <file>
Before you run it
Causes confusing pull conflicts later.
Related commands
- git ls-filesList tracked files
- git stashStash changes
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store