为什么不把乌龟作为我的合并工具? [英] Why doesn't tortoisemerge work as my mergetool?

查看:128
本文介绍了为什么不把乌龟作为我的合并工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了TortoiseGit,过去它已经无缝地使用了 tortoisemerge 作为我的mergetool。但是,由于我将TortoiseGit升级到1.8.x,我的mergetool不再工作:

  c:\代码\无论> git mergetool 
合并工具候选者:tortoisemerge emerge vimdiff
没有已知的合并解析程序可用。

这是用来工作的,为什么它现在坏了?

解决方案

根据这篇文章在1.8版中将TortoiseGit重命名为 tortoisemerge.exe tortoisegitmerge.exe

根据这篇博文,您需要输入以下命令:

  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'
pre>

然而,那对我并不适用我将以下内容添加到 .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 to tortoisegitmerge.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 to TortoiseGitMerge.exe:

[merge]
    tool = tortoisemerge
[mergetool "tortoisemerge"]
    path = C:\\Program Files\\TortoiseGit\\bin\\tortoisegitmerge.exe

这篇关于为什么不把乌龟作为我的合并工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆