The operation could not be performed because "PROJECTNAME" has one or more tree conflicts

35,324

Solution 1

There is a conflict in the project file you need to pull using the command line or a GUI tool like SourceTree (Free) and manually resolve the conflict in a text editor or diff tool.

See also:How to use Git properly with XCode?

Solution 2

I was in trouble with this problem. It often happens when I remove or change the directory of the project .For example, when I move one directory into another existing directory,both of the directory are real folder the warning will exist.

In fact the meaning of tree conflict is that the directory level in your work repository is not same as it was on server.

It's my way to resolve this problem :

  1. Check which directory in your local work repository differs from the server repository.
  2. If the local repository has extra directory Delete(local) -> update ->OK , if the local repository lacks of something and the extra elements in server is needless, Delete (server) -> update. NOTE After this the tree conflict is not existing any more.

Hope helps.

Solution 3

I had a similar issue. So I opened a terminal-windows and changed to the directory, verified my branch was clean with a git status, changed to master using git checkout master and merged my branch with git merge push-notifications. The Git Branching - Basic Branching and Merging page explains it in detail.

Share:
35,324
Tony Pham
Author by

Tony Pham

Updated on July 09, 2022

Comments

  • Tony Pham
    Tony Pham almost 2 years

    I am using Git and when I tried to pull a newer development branch with my current branch using XCode's source control menu I received this error message:

    The operation could not be performed because "ProjectName" has one or more tree conflicts.
    

    How do I resolve these tree conflicts? Thanks

  • Drew C
    Drew C over 7 years
    This should be the accepted answer. The tree conflicts that the question is about are not the same as merge conflicts within a file.
  • Drew C
    Drew C over 7 years
    The tree conflicts that Xcode reports are not the same thing as merge conflicts with a file. Normally, when performing a merge via Xcode, it alerts you to the merge conflicts and provides a UI for resolving them. When there are tree conflicts, however, it just alerts you to them and provides no way to resolve them. See the answer from lynulzy below for how to fix tree conflicts.
  • skymook
    skymook almost 6 years
    As odd as this may sound, this solution worked for me. All I did was switch to the branch (master) I wanted to merge into. Then merge the development branch I was working on into the master branch. The tree error did not show this time. It seems that Xcode prefers that you switch to the branch you want to merge into first before merging.