Git 合并工具:"No files need merging"

Git Mergetool: "No files need merging"

我正在尝试在 Cygwin 上使用 vimdiff 配置 git mergetool。我在我的 git 配置中设置了该工具,使用:

git config --global merge.tool vimdiff

但是,当我执行导致 "Automatic merge failed; fix conflicts and then commit the result." 和 运行 的合并时:

git mergetool

我得到:"No files need merging" 尽管 git 状态清楚地表明我有一个未合并的路径。

SO 上有几个帖子有类似的问题,但我无法用其他问题的任何解决方案解决这个问题。除了 git mergetool 之外,我还删除了 .gitconfig 的所有行,同样,我删除了 vimrc 的所有行。是否有一些其他配置文件或一些我需要的包(回想一下我正在使用 Cygwin)来制作 git mergetool 来打开 vimdiff?我错过了什么?这是 Linux 上的一项微不足道的任务。

首先,您可以尝试使用 latest Git 2.12.1 for Windows(不需要 Cygwin:该发行版有自己的 bash),看看问题是否仍然存在。

其次,确保冲突中没有 from files already committed 合并标记。

最后,确保use git mergetool in the right path