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?

- 1,053
- 2
- 11
- 19
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.

- 1,053
- 2
- 11
- 19
-
3This is a great solution because you can always scroll and compare the code on the left and right. I would only like to clarify that: 1 click “<“ you choose “Choose Left”; 2 clicks “<” you choose “Choose Left then Right”; 1 click “>” you choose “Choose Right”; 2 clicks “>” you choose “Choose Tight then Left” – iAleksandr Nov 11 '21 at 16:31