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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store