【发布时间】:2012-12-13 20:36:02
【问题描述】:
所以我看到了一些关于让 DiffMerge 成为 git 的 mergetool 和 difftool 的问题。本质上,它归结为在您的PATH 和.gitconfig 中包含 DiffMerge (sgdm.exe),如下所示:
[diff]
tool = DiffMerge
[difftool "DiffMerge"]
cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' "$LOCAL" "$REMOTE"
[merge]
tool = DiffMerge
[mergetool "DiffMerge"]
cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' -merge -result="$MERGED" "$LOCAL" "$BASE" "$REMOTE"
trustExitCode = true
keepBackup = false
当我运行git difftool file1 file2 时,什么也没有发生。没有错误代码,没有启动 DiffMerge。在 Git Bash 和 Windows 命令行中,我可以运行 sgdm file1 file2,然后 DiffMerge 就会出现。
我已将.gitconfig 中的cmd 修改为没有路径或扩展名(例如仅sgdm),但仍然无济于事。
有人遇到过吗?我缺少一些明显的东西吗?我觉得我错过了一些明显的东西。
【问题讨论】: