There are two members in our team. We use Xcode's SCM (use SVN) to manger our source code files.
We all add files to our Xcode project. He has committed to SVN server. When I update, Xcode find there has conflicts in project.pbxproj
file. Then I select quit Xcode
and manually merge the conflicts. Then I start to edit my project.pbxproj
, merge our changes. Actually I don't know how Xcode manage files, I just add some text that my project.pbxproj
file did't have. When I finish, my project can't open. I guess that because the project.pbxproj
file can't be edit by manual.
So, I want to know, when you find this problem, the project.pbxproj file have conflicts, how to solve it?
Thank you!
As stated above the most common way of handling the conflicts is to
I Wrote a bash-script that takes care of (1) above.
Note that this will only solve the most common case of merge conflicts!
To manually solve the merge conflicts, check the
UUID
of each conflicting item.Example:
Check each UUID:
ExistingFile.swift
NewFileA.swift
andNewFileB.swift
project.pbxproj
file, I would assume it is an artefact and safe to delete it.The result would be:
Note: I don't recommend adding
*.pbxproj merge=union
to the.gitattribues
file to basically ignore merge conflicts because a conflicting merge should alway be checked manually unless there is a sophisticated script doing that for you.The best thing to do might be to simply accept either your version or his version in its entirety, without trying to combine the two. Also, consider whether the file in question is something that should be in the repository at all; it may be more appropriate to let each person have their own version of it.
Check out the documentation on how to resolve conflicts.
Unfortunately, there's not much you can do except to make the changes manually in one check out and then check-in the newly "merged" project.