如何使用XCode的mergetool解决冲突? [英] How to use XCode's mergetool to resolve conflicts?

查看:186
本文介绍了如何使用XCode的mergetool解决冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正处于重新调整的中间,我需要解决一些合并冲突.当我在XCode中打开文件时,我在文件中看到了源代码管理冲突标记(<<<<<<<等).

I'm in the middle of a rebase and I need to fix some merge conflicts. When I open the file in XCode, I see the source control conflict markers (<<<<<<<, etc) in the file.

如何使用XCode的mergetool以图形方式解决这些冲突?我正在寻找此屏幕:

How can I use XCode's mergetool to resolve these conflicts in a graphical fashion? I'm looking for this screen:

推荐答案

这里

Pulling the answer from here

# 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的mergetool(如问题的屏幕快照中所示),并且您可以解决冲突.

Then, when git tells you that there is a conflict, you can run git mergetool and it will open XCode's mergetool (like in the question's screenshot) and you can work through the conflict.

这篇关于如何使用XCode的mergetool解决冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆