git diff无法在Mac上打开opendiff

时间:2016-03-23 09:27:27

标签: git macos git-diff opendiff

我使用git同时处理文本文档,并且我试图找到一种很好的视觉方式来查看其他人所做的更改。我可以通过键入git diff来完成此操作,但结果在终端上。我正在阅读this post,似乎可以将git配置为使用opendiff作为diff的默认查看器。然而,当我输入命令

$ git config --global merge.tool opendiff
$ git config --global diff.tool opendiff
$ git config --global difftool.prompt false

我做git diff我仍然在终端上获得输出。我做错了什么?

1 个答案:

答案 0 :(得分:2)

您需要使用命令git difftool(而不是git diff)和git mergetool(而不是git merge)git才能使用opendiff。