Skip to content

Instantly share code, notes, and snippets.

@el22or
Created March 1, 2017 15:46
Show Gist options
  • Save el22or/da992aefc3ccdb9538401d2c3d328c1e to your computer and use it in GitHub Desktop.
Save el22or/da992aefc3ccdb9538401d2c3d328c1e to your computer and use it in GitHub Desktop.
Ignore update on specific file, where you want to keep only local changes.

To leave the file in the repo but ignore future changes to it:

git update-index --assume-unchanged <file>

and to undo this:

git update-index --no-assume-unchanged <file>

to find out which files have been set this way:

git ls-files -v|grep '^h'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment