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]