Skip to content

Instantly share code, notes, and snippets.

@paulsturgess
Created May 2, 2013 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulsturgess/5503216 to your computer and use it in GitHub Desktop.
Save paulsturgess/5503216 to your computer and use it in GitHub Desktop.
GIT: Ignore local changes made to a file that cannot be in the .gitignore

For example, ignore your .rvmrc file:

git update-index --assume-unchanged .rvmrc

Find out which files will always be considered as unchanged:

git ls-files -v | grep ^[a-z]

Remove the unchanged flag:

git update-index --no-assume-unchanged .rvmrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment