1

Suppose a merge conflict happens. There are two options shown the upper (in red) and the lower (in green):

enter image description here

I would like to avoid complex ediff-mode stuff to pick one. I have seen some tutorial where the user would easily pick one of the them with a command. I believe it is a magit command.

What is the magit command to easily pick one of them?

1
  • 1
    There's smerge-keep-current, bound to C-c ^ RET that chooses the option under the cursor.
    – aadcg
    Jan 2 at 8:33

1 Answer 1

1

Use smerge-keep-lower to pick the lower (green) or smerge-keep-upper to get the upper (red) version. These are the commands.

Note: they are not magit commands! See documentation:

smerge-keep-lower is an interactive compiled Lisp function in
‘smerge-mode.el’.

(smerge-keep-lower)

Keep the "lower" version of a merge conflict.
In a conflict that looks like:
  <<<<<<<
  UUU
  =======
  LLL
  >>>>>>>
this keeps "LLL".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.