我最初执行了How to resolve merge conflicts in 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
发布于 2019-03-08 22:34:56
git配置merge.tool vimdiff
这将Git配置为只对此存储库使用vimdiff。
git配置--全局merge.tool opendiff
这将Git配置为对所有没有更具体配置的存储库使用opendiff,即,除前面配置的存储库外,所有存储库都使用opendiff。
git配置--全局merge.tool
这会问Git:如果我不在这个存储库中,或者其他任何具有覆盖集__的存储库中,您会使用什么工具?
若要使Git使用默认值,请删除本地覆盖:
git config --unset merge.tool(注:无--global)。
https://stackoverflow.com/questions/55071096
复制相似问题