Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I go to the next conflict in the Xcode merge tool?

When I choose to merge a git branch into another via Xcode 5, I get an interface that shows me all the files that are going to be changed including those with conflicts. Before I go ahead with the merge, I am supposed to click on each file with a red C and fix the conflicts.

Imagine one of the files has 100 changes and only 3 of them are in conflict. How can I easily jump to the next conflict in the file? (Besides either manually scrolling and looking for something red, or by tapping the next arrow button 100 times.)

Update: This is specifically referring to the merge window you access by invoking the Source Control > (working copy) > Merge to/from branch command which displays a window such as:

enter image description here (image source)

like image 551
Senseful Avatar asked Feb 09 '14 06:02

Senseful


People also ask

How do I see conflicts in XCode?

Show activity on this post. Then, when git tells you that there is a conflict, you can run git mergetool and it will open XCode's mergetool (like in the question's screenshot) and you can work through the conflict.

How do I see merge conflicts?

To see the beginning of the merge conflict in your file, search the file for the conflict marker <<<<<<< . When you open the file in your text editor, you'll see the changes from the HEAD or base branch after the line <<<<<<< HEAD .

How do you continue a merge after conflict?

merge : add ' --continue ' option as a synonym for ' git commit ' Teach ' git merge ' the --continue option which allows 'continuing' a merge by completing it. The traditional way of completing a merge after resolving conflicts is to use ' git commit '.


2 Answers

You can do it by pressing

  • cmd + D for next conflict
  • cmd + shift + D for previous conflict
like image 169
Dávid Tímár Avatar answered Sep 27 '22 16:09

Dávid Tímár


Arrow keys!

Down arrow to go to the next issue, left and right keys to chose the code. You may need to click on the frame between your two sources to enter this mode.

like image 27
John Seales Avatar answered Sep 27 '22 17:09

John Seales