Git include default configuration files then ignore further changes

You may want to add a default configuration file to Git so that if someone else picks up the code they only have to enter their particular details – however once you’ve configured it yourself you don’t want those changes tracked.

The solution is to use: git update-index --assume-unchanged path/to/file

To check which files in your repo are marked in that way use: git ls-files -v | grep ^[a-z]

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA - answer the question below to prove you are human *

This site uses Akismet to reduce spam. Learn how your comment data is processed.