Last Updated: February 25, 2016
·
348
· mrpollo

Git life saver for config files

If you work with config files chances are you have your dev env settings different from prod, so you might want to commit prod settings and change on your local, but what happens if you forget to change them back before pushing your code? yeah been there!

Luckily you can tell git to ignore further changes to some files

git update-index --assume-unchanged path/to/file.txt

You can ask git to follow changes again like this

git update-index --no-assume-unchanged path/to/file.txt