Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode merge: How to click "Left then right" button?

Tags:

git

xcode

I am trying to merge a branch in Xcode. The .pbxproj file has a lot of differences. Many differences are so far apart that I can't physically click the button because it never appears. Is there a shortcut? Can I merge manually? How is this even an issue, am I doing something wrong?

enter image description here

like image 485
user2330482 Avatar asked Sep 12 '25 00:09

user2330482


1 Answers

Best answer: Just use VSCode

I've found almost every merge operation to be WAY more easier to solve in VSCode's diff view. Install the https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens plugin and stop worrying about how Xcode does things.

Once you have performed 2 or 3 merges with VSCode you will notice how bad Xcode is at recognizing and assigning changes. VSCode has a really straightforward concept that does without Apple's "we make everything shiny with wavy illustrations that break stuff".

In VSCode, even conflicts in Apple's own project.pbxproj (How to merge conflicts (file project.pbxproj) in Xcode use svn?) are easier to solve than with Apple's own Xcode. It's a shame that, even without explicitely targeting Apple software, Microsoft does a better job at supporting Apple software than Apple themselves.

If you insist on Xcode:

I found out you can not only use the cursor keys to go up and down between conflicts but also press left/right to select the different merge options.

It's better than nothing but still almost useless because you can't see both sides at the same time. Also make sure to follow iAleksandr's comment below.

like image 130
user2330482 Avatar answered Sep 13 '25 15:09

user2330482