Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve conflicts about project.pbxproj in Xcode use git?

Tags:

git

xcode

I always solved this problem by using directory structure of the other members shall prevail ,and then confirm don't have any conflicts and mend it to what directory structure I want.

So, I want to know, the project.pbxproj file have conflicts, how to solve it through other best way?

like image 358
iforvert Avatar asked May 24 '16 08:05

iforvert


People also ask

How do I use Git Mergetool to resolve conflicts?

We can manually resolve the merge conflict by editing the content in the bottom pane, and then saving the file using :wqa (Write and Quit all files). Once the conflict resolution is successful, the merged file will be staged for commit. git commit -m 'Merged from multiple branches' .

What is a Git conflict and how are they resolved?

Luckily, Git offers powerful tools to help navigate and resolve conflicts. Git can handle most merges on its own with automatic merging features. A conflict arises when two separate branches have made edits to the same line in a file, or when a file has been deleted in one branch but edited in the other.

Does Git automatically resolve conflicts?

By default, when Git sees a conflict between two branches being merged, it will add merge conflict markers into your code and mark the file as conflicted and let you resolve it.


1 Answers

Normally, you simply want to accept both sides of the merge (people added different files) and that's all.

After that, if your file is still 'corrupted', in most cases the problem is due to a wrong format after merge, most common scenarios are:

  • missing a comma
  • duplicated statements

It's very easy to fix if you know what you are looking.

You can use a syntax checker to verify the project.pbxproj file, I use Kin and it works like a charm. It will parse your project configuration file and detect errors.


For Example (Using KIN)

If your project file gets corrupted you can be left with something like this:

enter image description here

And if your diffs on the file are far too much.. it can be quite challenging to find the error...now, after using KIN you can go from problem to solution in no time.

enter image description here

like image 102
Ana Llera Avatar answered Nov 15 '22 14:11

Ana Llera