I am tracking a project with git. There are some Xcode project files in the working copy that I want to keep tracking, but do not want to see in diffs, because there are always dozens of changed lines that I am never interested in. Is there a simple way to have git-diff skip these files? I’ve tried to set up a custom “silent” diff tool:
$ cat .gitattributes
Project.xcodeproj/* diff=nodiff
$ cat ~/.gitconfig
[diff "nodiff"]
command = /bin/true
But:
$ git diff external diff died, stopping at Project.xcodeproj/zoul.mode1v3.
What am I doing wrong?
The problem is that
/bin/truewill return immediately without reading its input.git difftherefore thinks, quite reasonably, that it has died prematurely.What you really want to do is to unset the diff attribute, not set it to a bogus command. Try this in your
.gitattributes: