git Kdiff3 不会用 mergetool 命令打开
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10883336/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Kdiff3 won't open with mergetool command
提问by iKode
I have conflicts, so I type:
我有冲突,所以我输入:
git mergetool
I then get a message saying:
然后我收到一条消息说:
Hit return to start merge resolution tool
点击返回以启动合并解析工具
Normally when I do this, it open kdiff3 so I can merge the differences.
通常当我这样做时,它会打开 kdiff3 以便我可以合并差异。
now when I do it, it just continues to the next file, and kdiff3 doesn't open at all.
现在当我这样做时,它只会继续下一个文件,而 kdiff3 根本没有打开。
I triple cheched my git config and my system path and all seems perfect. Config file is as follows:
我对我的 git 配置和系统路径进行了三次检查,一切似乎都很完美。配置文件如下:
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = c:/Program Files (x86)/KDiff3/kdiff3.exe
[diff]
guitool = kdiff3
[difftool "kdiff3"]
path = c:/Program Files (x86)/KDiff3/kdiff3.exe
[core]
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor autocrlf = true
[user]
name = James Farrell
email = [email protected]
[github]
user = whygosystems
token = 87d00c2e613b3a7c8c1be817b75b8a33
[diff]
external = C:/Program Files (x86)/Git/cmd/git-diff-wrapper.sh
Anyone have any ideas what might be wrong?
任何人都知道可能有什么问题?
I have a feeling (though I could be wrong, that this has been a problem, since I installed the new Github windows client)....
我有一种感觉(虽然我可能是错的,但自从我安装了新的 Github Windows 客户端以来,这一直是一个问题)...
回答by Dan
I realize this is old, but for future googlers, KDiff3 also has an option where if the merge is trivial, it will resolve it silently and never even show a window.
我意识到这已经过时了,但对于未来的谷歌人来说,KDiff3 也有一个选项,如果合并是微不足道的,它会默默地解决它,甚至从不显示窗口。
I've had that happen to me in the past, so it might be what's happening for you. I think the option is called 'Auto save and quit on merge without conflicts'.
过去我也遇到过这种情况,所以这可能就是你的情况。我认为该选项称为“自动保存并在没有冲突的情况下退出合并”。
回答by seth
I haven't used git for this purpose on Windows in a while, but your config file shows some interesting differences re: program strings.
我有一段时间没有在 Windows 上为此目的使用 git,但是您的配置文件显示了一些有趣的差异:程序字符串。
[core]
editor = \"C:/Program Files (x86)/GitExtensions/GitExtensions.exe\" fileeditor autocrlf = true
vs
对比
[difftool "kdiff3"]
path = c:/Program Files (x86)/KDiff3/kdiff3.exe
I suspect that there might be some issue with the spaces in the program name. Try setting your diff/mergetool executable paths to:
我怀疑程序名称中的空格可能存在一些问题。尝试将您的 diff/mergetool 可执行路径设置为:
path = \"c:/Program Files (x86)/KDiff3/kdiff3.exe\"
回答by Zack Martin
Again, for future Googlers:
再次,对于未来的 Google 员工:
As of version 2.48.02 (29 November 2014), Git Extensions started distributing the 64-bit version of kdiff3. (See https://github.com/gitextensions/gitextensions/blob/master/GitUI/Resources/ChangeLog.md#version-24802-29-november-2014.)
从 2.48.02 版本(2014 年 11 月 29 日)开始,Git Extensions 开始分发 64 位版本的 kdiff3。(参见https://github.com/gitextensions/gitextensions/blob/master/GitUI/Resources/ChangeLog.md#version-24802-29-november-2014。)
So if you're running a 32-bit OS and had the Git Extensions installer install kdiff3, your kdiff3 won't even run by itself. The solution is to download the 32-bit version (http://sourceforge.net/projects/kdiff3/files/kdiff3/) and reinstall. I didn't even need to uninstall the 64-bit version first, as the installer simply overwrote the previous install.
因此,如果您运行的是 32 位操作系统并且让 Git 扩展安装程序安装了 kdiff3,那么您的 kdiff3 甚至不会自行运行。解决方法是下载 32 位版本 ( http://sourceforge.net/projects/kdiff3/files/kdiff3/) 并重新安装。我什至不需要先卸载 64 位版本,因为安装程序只是覆盖了以前的安装。
回答by John Reynolds
Yet another answer for future Googlers:
未来 Google 员工的另一个答案:
Actually, no external merge tool will start. An issue was filed in August 2015: https://jira.atlassian.com/browse/SRCTREEWIN-3543
实际上,不会启动任何外部合并工具。2015 年 8 月提交了一个问题:https: //jira.atlassian.com/browse/SRCTREEWIN-3543