Sometimes you want to temporarily ignore a file in a Git repository without throwing it out entirely by putting it in .gitignore
. Here's how to do it:
$ git update-index --assume-unchanged [filename]
To start tracking changes again:
$ git update-index --no-assume-unchanged [filename]
http://solutions.trey.cc/2011/01/07/temporarily-ignore-a-file-in-git/