I am trying to exclude a file (
You could set up a custom diff driver with a no op command and assign it to those files that should be ignored.
Create a repository specific diff driver with this command
git config diff.nodiff.command /bin/true
or for all your repos with
/bin/true doesn't exist in MacOS, alternatives would be using
Then, assign the new diff driver to those files you want ignored in your
If this state is supposed to be shared with other developers you could use
.gitattributes instead of
.git/info/attributes and share the
git config command with your peers (through a documentation file or something).