Xcode tree conflicts on merge

痞子三分冷 提交于 2019-12-08 08:49:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!