Try using this command:
git update-index --assume-unchanged FILENAME_TO_IGNORE
To reverse it (if you ever want to commit changes to it), use:
git update-index --no-assume-unchanged
UPDATE:
Here’s how to list ‘assume unchanged’ files under current directory:
git ls-files -v | grep -E "^[a-z]"
As the -v
option will use lowercase letters for ‘assume unchanged’ files.