Let's say I have a merge conflict. I see a conflicted file like this:
Unstaged changes:
Unmerged Foo/bar/wibble/plop/elbow.txt
I can hit tab here to open the changes and maybe jump to a point inside the file to fix by hand, but if it's a big file with lots of conflicts that can be time consuming.
How can I ask git, through magit, to checkout the ours or theirs version of the file, to resolve the conflict? I can copy the path, then use Shift-:
to enter a custom git command, but it seems like there must be a keyboard shortcut for this. I can't see anything obvious in the magit menu or the ?
pop-up.
magit-status
and presse
to start 3-way merging withediff
. Another alternative is that in a conflict buffer, you can turn onsmerge-mode
for conflict highlighting and perform interactive merging right in your buffer (not ediff). The prefix key binding forsmerge-mode
related commands isC-c ^
; you can pressC-c ^ C-h
to view all key bindings.k
on a confict and choose which version to keep. Sounds perfect! github.com/magit/magit/issues/1643