xcode:解决合并冲突失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36637992/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
xcode: resolve merge conflicts failed
提问by Han Pengbo
I try to merge two branches with Xcode. I get conflict, and I use "let then right" button to reconcile conflict. But when I click "merge", Xcode shows the error
我尝试将两个分支与 Xcode 合并。我遇到了冲突,我使用“let then right”按钮来调和冲突。但是当我单击“合并”时,Xcode 显示错误
fatal: You have not concluded your merge (MERGE_HEAD exists).
Please, commit your changes before you merge.
回答by Adela Chang
The four icons at the bottom mean this:
底部的四个图标表示:
- left then right- keep both changes, placing the left code before the right
- left- keep only the left file
- right- keep only the right file
- right then left- keep both changes, placing the right code before the left
- 先左后右- 保留两个更改,将左侧代码放在右侧之前
- left- 只保留左边的文件
- 正确- 只保留正确的文件
- 先右后左- 保留两个更改,将正确的代码放在左侧之前
You chose "left then right" as you stated. However, I see that in your code both files have <outlet property="bottomView">
and <outlet property="finishSuiDuButton">
line which will result in duplicate code after merge, since the code from bothfiles will be included. It looks to me like the option you actually want is option 2 - keep only the left file.
正如您所说,您选择了“左后右”。但是,我看到在您的代码中,两个文件都有<outlet property="bottomView">
和<outlet property="finishSuiDuButton">
行,这将在合并后导致重复的代码,因为将包含来自两个文件的代码。在我看来,您真正想要的选项是选项 2 - 仅保留左侧文件。
Either that or remove the duplicate code from one of the files and you should be good. :)
或者从其中一个文件中删除重复的代码,你应该很好。:)