Why doesn't tortoisemerge work as my mergetool?

我与影子孤独终老i 提交于 2019-12-03 09:28:38

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/15881449/why-doesnt-tortoisemerge-work-as-my-mergetool

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!