4

I have executed git mergetool to try to resolve some merge conflicts.

It opens 3 text windows (within my SSH terminal) with different versions of code in each.

The code I want is in the window on the right.

How do I tell git to take this version and move on?

Here's the screen shot...enter image description here

Alex R
  • 11,364
  • 15
  • 100
  • 180

1 Answers1

6

According to this blogpost:

There are two basic strategies for reconciling a 3-way diff. You can either keep your cursor in the middle file, and run :diffget with the bufspec for the file containing the change you want to keep. Or you can position your cursor on the change that you want to keep, and run :diffput with the bufspec for the working copy file.

Now, a bufspec is a buffer number, a pattern for a buffer name or a part of a buffer name, like "v2" in "file.cpp.v2". If you type 2 plus CTRL+G, it shows you the buffer number and file.

Roberto
  • 11,557
  • 16
  • 54
  • 68