I think you are looking for the assume-unchanged
flag of update-index
- this will allow any local changes to a tracked file be ignored by git.
git update-index --assume-unchanged <file>
From the git-update-index
man page
When these flags are specified, the object names recorded for the paths are not updated. Instead, these options set and unset the "assume unchanged" bit for the paths. When the "assume unchanged" bit is on, Git stops checking the working tree files for possible modifications, so you need to manually unset the bit to tell Git when you change the working tree file.
To undo the effect of above, use:
git update-index --no-assume-unchanged <file>