如何将Meld设置为git mergetool [英] How to set Meld as git mergetool

查看:251
本文介绍了如何将Meld设置为git mergetool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置:

git config --global merge.tool meld
git config --global mergetool.meld.path c:/Progra~2/meld/bin/

在"git mergetool"上写道:

On "git mergetool" it writes:

Hit return to start merge resolution tool (meld):
The merge tool meld is not available as 'c:/Progra~2/meld/bin/'

我也尝试过:

  • /c/Progra〜2/meld/bin/
  • "/c/程序文件(x86)/meld/bin/"
  • "c:/程序文件(x86)/meld/bin/"

结果是相同的.

当我转到C:/Program Files(x86)/meld/bin/并运行

when I go to C:/Program files (x86)/meld/bin/ and run

python meld

该工具运行.

推荐答案

您可以使用完整的Unix路径,例如:

You could use complete unix paths like:

PATH=$PATH:/c/python26
git config --global merge.tool meld
git config --global mergetool.meld.path /c/Program files (x86)/meld/bin/meld

这是"

或者您可以采用"使用中所述的包装方法在Windows上与Git融合"

# set up Meld as the default gui diff tool
$ git config --global  diff.guitool meld

# set the path to Meld
$ git config --global mergetool.meld.path C:/meld-1.6.0/Bin/meld.sh

使用脚本meld.sh:

#!/bin/env bash
C:/Python27/pythonw.exe C:/meld-1.6.0/bin/meld $@


abergmeier 提到


abergmeier mentions in the comments:

我必须做:

I had to do:

git config --global merge.tool meld
git config --global mergetool.meld.path /c/Program files (x86)/Meld/meld/meldc.exe

请注意,meldc.exe是专门为通过控制台在Windows上调用而创建的.因此,meld.exe将无法正常工作.

Note that meldc.exe was especially created to be invoked on Windows via console. Thus meld.exe will not work properly.


homebrew a>,然后:


CenterOrbit mentions in the comments for Mac OS to install homebrew, and then:

brew cask install meld
git config --global merge.tool meld
git config --global  diff.guitool meld

这篇关于如何将Meld设置为git mergetool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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