问题
I'm working in team with git and every time we try to merge code we have a tree conflict. We're currently working with git flow and we usually start features from develop, when the task is finished one of us merges one feature into the other and then merge it into develop. The problem is than every time we try to merge one feature into another we have a tree conflict in xcode and we don't know how to fix it.
The error message is: "The operation could not be performed because of one or more tree conflicts."
回答1:
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.
回答2:
I solved this by merging differently: First I merged feature1 into develop, then I merged develop into feature2 and final feature2 in develop. In this way there aren't tree conflicts.
回答3:
This happened to me too. The problem was that the master
branch had uncommited changes (unrelated to the changes in the other one). Switching to master
and committing the changes allowed me to merge the feature branch back into master
.
Try committing all the changes on all the branches and try the merge again after that.
来源:https://stackoverflow.com/questions/42507079/xcode-tree-conflicts-on-merge