Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the Xcode side by side code comparison option?

Since Xcode 13, code comparison default is no longer a side-by-side diff.

There must be a way of doing this still.

I am struggling to find the option!

like image 294
Nick Hingston Avatar asked Sep 21 '21 16:09

Nick Hingston


People also ask

How do I compare two branches in Xcode?

Yes you can compare file wise, just go to that specific file where you want to see modified changes by other branch. on left side, select your own branch and on right side, select branch which has done modifications. Then you can compare by commits, listed time wise just beside branch name.

How to compare commits in Xcode?

To compare changes in one source file, open the file and click the Enable Code Review button in the upper-right corner of the Xcode window. The comparison view highlights changes between the current source code and the most recent commit.

How do I open two files in Xcode?

Hold the option key down, and click on files in either the project view or the editor tabs and they will open in a new editor view.


2 Answers

Click on Code Review (the blue button on the screenshot), the one with one arrow to the left and the other one to the right (or in View Menu).

Then, on the second icon, select Side by Side Comparison instead of Inline Comparison (or in Editor Menu).

"Commits list" is at the bottom, on the bar with Enable Breakpoints, etc.

enter image description here

like image 180
Larme Avatar answered Oct 20 '22 11:10

Larme


You can enable it quickly in the menu Editor > Side By Side Comparison.

Editor > Side By Side Comparison

like image 2
Marián Černý Avatar answered Oct 20 '22 12:10

Marián Černý