我正处于一个rebase的中间,我需要修复一些合并冲突。当我在XCode中打开文件时,我在文件中看到源控件冲突标记(<<<<<<<等)。
如何使用XCode的mergetool以图形方式解决这些冲突?我正在寻找这个屏幕:
从here得到答案
# Tell system when 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的mergetool(就像在问题的截图中一样),你可以解决冲突。