Ignoring local changes with Git
If you have configuration files or any other files in the local repository that you would like to keep as they are without the danger of adding them by mistake in a commit, you can specify that using the update-index
command.
git update-index --assume-unchanged path/to/file
To start tracking changes to the file again, use:
git update-index --no-assume-unchanged path/to/file
Written by Stephan Steynfaardt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#