0

我安装了 diffmerge 并将其粘贴到我.gitconfig文件C:/Users夹中的文件中。

[diff]
    tool = diffmerge
[difftool "diffmerge"]
    cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe\"$LOCAL\" \"$REMOTE\"

[merge]
    tool = diffmerge
[mergetool "diffmerge"]
    trustExitCode = true
    cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe-merge -result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"

但是现在当我difftool在 git bash 中使用时,我得到了这个

/mingw64/libexec/git-core/git-mergetool--lib: line 128: C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exeC:\Users\Anas\AppData\Local\Temp/hhqGyv_calc.py: No such file or directory
fatal: external diff died, stopping at calc.py
4

1 回答 1

0

sdgm.exe我遇到这个问题的原因是我在两个不同的地方之后没有留下空间。

第一个在我写的第 4 行,sdgm.exe\"LOCAL\"而不是它应该是

sdgm.exe \"LOCAL\".

第二个在我写的第 10 行,sdgm.exe-merge而不是它应该是

sdgm.exe -merge

谢谢@ElpieKay@quamrana帮助我。

于 2020-07-14T05:08:58.930 回答