Git:打开没有冲突的合并工具

Tho*_*ier 5 git git-merge merge-conflict-resolution

我在合并时遇到问题,但 git 没有将文件标记为冲突。当我尝试使用 . 打开文件时git mergetool,git 只是说:No files need merging.

如何以三种方式比较在没有合并冲突的情况下打开文件?

j6t*_*j6t 3

您可以执行以下操作:

git merge --no-commit topic
git checkout --merge that_file
git mergetool that_file
git commit
Run Code Online (Sandbox Code Playgroud)

也就是说,您避免成功合并创建提交,然后假装 中存在冲突that_file,然后您可以使用 来处理该文件git mergetool。最后,您提交结果。