不能将`git mergetool`与`git am`、`git apply`或`patch`一起使用 [英] Cannot use `git mergetool` with `git am` or `git apply` or `patch`
本文介绍了不能将`git mergetool`与`git am`、`git apply`或`patch`一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
git mergetool
非常好(在我的例子中,我使用kdif3)。但是,无法使用它来解决git am
或git apply
(甚至通过patch
命令)产生的冲突。事实上,Mergetool需要3个文件才能工作(基本版本和两个修改版本),而git am
使用修改版本和补丁。
您知道使用git mergetool
处理git am
产生的冲突的方法吗?
我认为有必要从修改后的版本和补丁中猜测基本文件。如果你单独考虑每一块,看起来很棘手,但也不是不可能。
推荐答案
如torek所述,git mergetool
如果您是:
- 执行
git am --3way
- 正在执行常规git,但config
am.threeWay
设置为True。
此问题仍然适用于常规修补命令。
这篇关于不能将`git mergetool`与`git am`、`git apply`或`patch`一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文