所以我看到了一些关于让 DiffMerge 成为gitmergetool的问题。difftool从本质上讲,它归结为在您的 DiffMerge (sgdm.exe) 中PATH,.gitconfig它看起来像:
[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。
我已将cmd中的修改.gitconfig为没有路径或扩展名(例如sgdm只有),但仍然无济于事。
有没有人遇到过这个?我缺少一些明显的东西吗?我觉得我错过了一些明显的东西。