I have a config file stuff.conf in an open source project I’m working on. I want an example copy of this file to live in the Git repository (in its rightful path) so that people who clone the project will get it. However, it’s convenient to make local changes to the config while working on the software—at which point I inevitably inadvertently commit those changes with git -a. At best, the changed file lies around whining at git status.
A similar problem arises in Makefiles with config variables in them.
Is there any way, short of removing the file from Git control, to tell Git to simply ignore changes to a particular path until further notice?
git update-index --assume-unchangedshould do the trick.From http://www.kernel.org/pub/software/scm/git/docs/git-update-index.html: