Cloned git repo ignoring versioned files
I have recently cloned a github repository and .gitignore was simply not ignoring some versioned files.
Some files in the .gitignore should not be committed to the original repository as they are configuration files.
In order to prevent these files from being committed a nice trick is to let git assume they are unchanged:
git update-index --assume-unchanged path/to/file.txt
To revert back this process use:
git update-index --no-assume-unchanged path/to/file.txt
Original source:
https://help.github.com/articles/ignoring-files
Written by Bassem Dy
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#