How to ignore changes in tracked files with Git
13 Nov 2012If you’ve added files into your GIT repository, then realised you don’t want changes to these files tracked.( ie. log files, cache directories etc. ) adding the tracked files to .gitignore won’t work.
GIT will still track the changes and commit the file if you use the -a
parameter.
To untracked file changes use the below command:
git update-index --assume-unchanged <file>
If you wanna start tracking changes again run the following command:
git update-index --no-assume-unchanged <file>
For more info refer the Git manual on this topic