我最初执行了如何解决 Git 中的合并冲突中提到的命令
我做了:
git config merge.tool vimdiff
git config merge.conflictstyle diff3
git config mergetool.prompt false
然后我做了提到的命令How to use opendiff as default mergetool
我做了两个:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
git config --global merge.tool opendiff
我还检查了它:
$ git config --global merge.tool
终端说是opendiff
但是,当我执行 git 时mergetool
,它会恢复为使用vimdiff
.
如果我尝试链接答案中的第二个解决方案,即:
$ git mergetool -t opendiff
然后它工作一次。
那么我如何才能将其永久更改为opendiff