【问题标题】:Git diff broken in window git bash shell (Windows)Git diff 在窗口 git bash shell (Windows) 中损坏
【发布时间】:2014-01-21 17:37:25
【问题描述】:

我在 Windows 7 下工作,使用 github 客户端,有时使用 git bash shell。

我曾经使用以下信息在 Winmerge 中配置我的 git diff 工具: How do I view 'git diff' output with a visual diff program?

由于未知原因,我不能再使用 git diff 命令了:

$ git diff
error: cannot spawn winmerge.sh: No such file or directory
external diff died, stopping at path/to/a/file

winmerge.sh 位于可以从常规 cmd shell 的路径访问的文件夹中,但不能从 git bash shell 访问。

我还尝试通过删除与 diffdifftool 相关的每一行(都在 ~/.gitconfig文件并使用git config --global --unset 命令),但调用git diff 时仍显示上述错误消息。

任何帮助将不胜感激!

【问题讨论】:

  • git diff 不应该启动 difftool,而是在控制台中显示一个 diff。我建议重新安装它。
  • 我卸载并重新安装了 github 客户端但没有成功:git diff 产生相同的错误...
  • 你读过this documentation吗?
  • 是的,但我的 diff.tool 设置为 vs11:它不应该尝试打开 winmerge.sh 对吗?
  • 你查看过本地 git 配置的 repo (.git/config) 吗?也许那里出了点问题。

标签: windows git diff git-diff


【解决方案1】:

事实上,我在 PATH 中引用了 winmerge.sh。抱歉问了一个不好的问题!

【讨论】:

    猜你喜欢
    • 2018-04-17
    • 2016-09-05
    • 2017-07-24
    • 2012-04-13
    • 2013-05-16
    • 2017-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多