git update-index --skip-worktree config.local.json

Category: Git - Advanced

git update-index --skip-worktree config.local.json

Ignore local changes to a tracked file

Marks the file so Git ignores local modifications to it, keeping the committed version intact. It is designed for files that differ per machine, like local config, and is stronger than assume-unchanged. Revert with --no-skip-worktree when you want changes tracked again.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.