# Tell system where Xcode utilities live:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
# Set "opendiff" as the default mergetool globally:
git config --global merge.tool opendiff
然后,当 git
告诉你有冲突时,你可以运行 git mergetool
,它会打开 XCode 的合并工具(就像问题截图中的那样),然后你可以解决冲突。