Ignore files with git locally2014-05-21
Sometimes it's necessary to ignore some files in a repository only locally.
For rails developers it's often
Every developer has his own database configuration.
With git it can be easily achieved, we may instruct git no to track changes in certain files:
git update-index --assume-unchanged ./config/database.yml
Next time we type
git status the changes in
./config/database.yml won't be shown.
If you think you need to track that file again, just do:
git update-index --no-assume-unchanged ./config/database.yml
(pay attention to