Excluding files from git-diff

后端 未结 4 1973
情话喂你
情话喂你 2020-12-13 03:52

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 alw

4条回答
  •  甜味超标
    2020-12-13 03:59

    The problem is that /bin/true will return immediately without reading its input. git diff therefore 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:

    Project.xcodeproj/* -diff
    

提交回复
热议问题