Xcode 合并两个分支 Git

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24389781/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:07:40  来源:igfitidea点击:

Xcode merge two branch Git

xcodegitmerge-conflict-resolution

提问by Khant Thu Linn

I have two branch and they are called as NewFeature1 and subFun100. subFun100 is a branch created from previous commit in NewFeature1. Now, I have fixed code in subFun100 and I want to merge back into NewFeature1 branch. But, I have conflict like this. I just want to take both codes and how shall I do? Merge button is hidden and I can't click. Is there any step I am missing?

我有两个分支,它们被称为 NewFeature1 和 subFun100。subFun100 是从 NewFeature1 中先前提交创建的分支。现在,我在 subFun100 中有固定的代码,我想合并回 NewFeature1 分支。但是,我有这样的冲突。我只想拿两个代码,我该怎么做?合并按钮被隐藏,我无法点击。有没有我遗漏的步骤?

enter image description here

在此处输入图片说明

采纳答案by Warif Akhand Rishi

Merging Two Branchesfrom developer apple.

合并来自开发者苹果的两个分支

3 . Resolve differences by using the left and right buttons to specify which file's contents to use.

4 . After resolving all differences and conflicts, click Merge.

3 . 通过使用左右按钮指定要使用的文件内容来解决差异。

4 . 解决所有差异和冲突后,单击合并。

enter image description here

在此处输入图片说明

Use these 4 buttons. (red circle)

使用这 4 个按钮。(红圈)

How To Use Git Source Control with Xcode in iOS 7

如何在 iOS 7 中通过 Xcode 使用 Git 源代码管理

回答by Gabriele Petronella

You need to resolve each conflict, choosing either left, right or both. Only then you can complete the merge.

您需要解决每个冲突,选择左、右或两者。只有这样,您才能完成合并。