Skip to content

Instantly share code, notes, and snippets.

@jimmygle
Last active August 29, 2015 14:17
Show Gist options
  • Save jimmygle/c83ebe5fc19f7bc3ce21 to your computer and use it in GitHub Desktop.
Save jimmygle/c83ebe5fc19f7bc3ce21 to your computer and use it in GitHub Desktop.
Git - Ignore changes made to a file already in the repo
# This is useful if you want to commit an initial version of a file and
# then ignore any updates to it (ie config files).
# Ignores any changes to the file
git update-index --assume-unchanged <file>
# Undo ignore any changes to the file
git update-index --no-assume-unchanged <file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment