Cannot use `git mergetool` with `git am` or `git apply` or `patch`

837 views Asked by At

git mergetool is wonderful (in my case, I use kdiff3). However, it is not possible to use it to resolve conflicts from git am or git apply (or even with patch command). Indeed, mergetool need 3 files to work (base and both modified versions) while git am work with a modified version and a patch.

Do you know a way to use git mergetool for conflicts produced with git am?

I think it is necessary to guess the base file from modified version and patch. If you consider each chunk separately, it looks tricky, but not impossible.

1

There are 1 answers

0
VonC On

As torek mentions, git mergetool will be involved if you are:

The issue remains for a regular patch command.