为什么不把乌龟作为我的合并工具? [英] Why doesn't tortoisemerge work as my mergetool?
问题描述
我安装了TortoiseGit,过去它已经无缝地使用了 tortoisemerge
作为我的mergetool。但是,由于我将TortoiseGit升级到1.8.x,我的mergetool不再工作:
c:\代码\无论> git mergetool
合并工具候选者:tortoisemerge emerge vimdiff
没有已知的合并解析程序可用。
这是用来工作的,为什么它现在坏了?
根据这篇文章在1.8版中将TortoiseGit重命名为 tortoisemerge.exe
至 tortoisegitmerge.exe $ c $因为旧版本无法处理文件名中的空格。
根据这篇博文,您需要输入以下命令:
git config --global merge.tool tortoisemerge
pre>
git config --global mergetool.tortoisemerge.cmd'C:/ Program Files / TortoiseGit / bin / TortoiseGitMerge.exe-base:$ BASE-theirs:$ REMOTE-mine:$ LOCAL-merged:$ MERGED'
然而,那对我并不适用我将以下内容添加到
.gitconfig
(它将路径更改为TortoiseGitMerge.exe
:[合并]
工具= tortoisemerge
[mergetooltortoisemerge]
path = C:\\\ \\程序文件\\\TortoiseGit \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\I have TortoiseGit installed, and in the past it's used
tortoisemerge
as my mergetool seamlessly. But since I upgraded TortoiseGit to 1.8.x, my mergetool is no longer working:c:\Code\whatever> git mergetool merge tool candidates: tortoisemerge emerge vimdiff No known merge resolution program available.
This used to work, so why is it broken now?
解决方案According to this post, in version 1.8 TortoiseGit renamed
tortoisemerge.exe
totortoisegitmerge.exe
because the old version could not handle spaces in file names so well.According to this blog post, you'll need to enter the following commands:
git config --global merge.tool tortoisemerge git config --global mergetool.tortoisemerge.cmd '"C:/Program Files/TortoiseGit/bin/TortoiseGitMerge.exe" -base:"$BASE" -theirs:"$REMOTE" -mine:"$LOCAL" -merged:"$MERGED"'
However, that didn't work for me so I added the following to my
.gitconfig
(which just changes the path toTortoiseGitMerge.exe
:[merge] tool = tortoisemerge [mergetool "tortoisemerge"] path = C:\\Program Files\\TortoiseGit\\bin\\tortoisegitmerge.exe
这篇关于为什么不把乌龟作为我的合并工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!