使用diffmerge mergetool与git的问题

时间:2015-01-16 22:38:55

标签: git mergetool difftool

我试图使用diffmerge在git中解决一些合并冲突,我只是在我的机器上设置了op,但是它失败了并且出现了错误:

Hit return to start merge resolution tool (diffmerge):
C:\Program Files (x86)\Git/libexec/git-core/mergetools/diffmerge: line 136: diffmerge: command not found
merge of nextclue_input.cpp failed

以下是路径指向的文件的内容:

diff_cmd () {
    "$merge_tool_path" "$LOCAL" "$REMOTE" >/dev/null 2>&1
}

merge_cmd () {
    if $base_present
    then
        "$merge_tool_path" --merge --result="$MERGED" \
            "$LOCAL" "$BASE" "$REMOTE"
    else
        "$merge_tool_path" --merge \
            --result="$MERGED" "$LOCAL" "$REMOTE"
    fi
    status=$?
}

以下是我为diffmerge设置我的.gitconfig文件的方法:

[merge]
    tool = diffmerge
[mergetool "diffmerge"]
    cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE
    trustExitCode = true
[diff]
    tool = diffmerge
[difftool "diffmerge"]
    cmd = diffmerge $LOCAL $REMOTE

我不明白请帮忙。

1 个答案:

答案 0 :(得分:2)

可能diffmerge不在%PATH%中。尝试在mergetool.diffmerge.cmddifftool.diffmerge.cmdcmd设置第2和第4部分)中指定命令的完整路径