3

Sometimes when resolving a git conflict, I'll know that one side is better for a file and I'll resolve it with git checkout --theirs path/to/file.

However it is not obvious how to do this in magit, so I always drop to the CLI to do it. Is it possible to do this easily?

fommil
  • 5,757
  • 8
  • 41
  • 81

2 Answers2

7

On the next branch (what will be 2.1.0), when you are rebasing and discard a conflict ('k'), you will be prompted and have the option to select --theirs. You can also call magit-checkout-stage directly and select the file and --theirs flag.

For version 1.2.*, I think using Ediff with magit-interactive-resolve is the closest you can get.

Kyle Meyer
  • 1,546
  • 9
  • 10
0

If you right-click on the arrows at the head of the conflict

<<<<<<<< HEAD

a menu will appear and will let you select the appropriate action.

ruby_object
  • 1,229
  • 1
  • 12
  • 30