How do you make git diff use gitx --diff on OS X

后端 未结 7 2075
礼貌的吻别
礼貌的吻别 2020-12-23 23:14

Gitx has a great diff viewer, how do I make git automatically pipe git diff whatever into gitx?

I\'ve tried to set git config diff.external to a shell scrip

7条回答
  •  温柔的废话
    2020-12-23 23:41

    like sigjuice is saying up there. Only that noobs (like i am now) need to know how to "connect" git to use it. Here is what I did

    echo 'opendiff $2 $5' > ~/opendiff-git.sh
    chmod a+x ~/opendiff-git.sh
    git config --global diff.external ~/opendiff-git.sh 
    

    and now all "git diff whatever" should open FileMerge.app ...

提交回复
热议问题