简体   繁体   中英

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

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.

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

The issue remains for a regular patch command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM