【问题标题】:Git difftool not working Windows 10 Git BashGit difftool 不工作 Windows 10 Git Bash
【发布时间】:2020-07-10 08:23:52
【问题描述】:

我安装了 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\"

但是现在当我在 git bash 中使用 difftool 时,我明白了

/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

【问题讨论】:

  • 您似乎错过了sgdm.exe\"$LOCAL\"exe\"$LOCAL 之间的空格。
  • 应该有空格吗?让我试试
  • @ElpieKay 非常感谢。有效。你能告诉我这个问题我应该怎么做吗?我应该保留它还是关闭/删除它?
  • 你还有:sgdm.exe-merge,应该是sgdm.exe -merge
  • @An4s911 你可以写一个答案并接受它,以便其他人在遇到类似问题时可以找到解决方案。

标签: python git difftool diffmerge


【解决方案1】:

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

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

sdgm.exe \"LOCAL\".

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

sdgm.exe -merge

感谢 @ElpieKay@quamrana 帮助我。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-05-05
    • 2018-06-24
    • 2022-07-05
    • 2012-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多