我正在与 git 合作,每次我们尝试合并代码时都会发生树冲突。我们目前正在使用 git flow,我们通常从开发开始功能,当任务完成时,我们中的一个人将一个功能合并到另一个,然后将其合并到开发中。问题是每次我们尝试将一个特性合并到另一个特性时,我们都会在 xcode 中发生树冲突,我们不知道如何解决它。
错误消息是:“由于一个或多个树冲突,无法执行操作。”
我正在与 git 合作,每次我们尝试合并代码时都会发生树冲突。我们目前正在使用 git flow,我们通常从开发开始功能,当任务完成时,我们中的一个人将一个功能合并到另一个,然后将其合并到开发中。问题是每次我们尝试将一个特性合并到另一个特性时,我们都会在 xcode 中发生树冲突,我们不知道如何解决它。
错误消息是:“由于一个或多个树冲突,无法执行操作。”
Please add .gitignore file if you have not added.
Refer link given below.
How to add .gitignore file into Xcode project
If it doesn't solve your problem, you can try to merge using terminal using given below command.
git mergetool
And then if there are any conflict then you can solve it.
这也发生在我身上。问题是master
分支有未提交的更改(与另一个分支中的更改无关)。切换到master
并提交更改允许我将功能分支合并回master
.
尝试在所有分支上提交所有更改,然后再次尝试合并。
我通过不同的合并解决了这个问题:首先我将feature1合并到develop,然后我将develop合并到feature2,最后将feature2合并到develop。这样就没有树冲突。