简体   繁体   English

git git bash shell(Windows)中的Git diff损坏

[英]Git diff broken in window git bash shell (Windows)

I am working under Windows 7, using the github client and sometimes the git bash shell. 我正在Windows 7下使用github客户端,有时使用git bash shell。

I used to configure my git diff tool with Winmerge using the following information: How do I view 'git diff' output with a visual diff program? 我以前使用Winmerge使用以下信息配置git diff工具: 如何使用可视化diff程序查看“ git diff”输出?

For an unknown reason, I cannot use the git diff command anymore: 由于未知的原因,我不能再使用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 is located in a folder accessible from the path from the regular cmd shell, but not from the git bash shell. winmerge.sh位于一个文件夹中,该文件夹可从常规cmd shell的路径访问,但不能从git bash shell的路径访问。

I also tried to reset the git diff config by removing every line relative to diff and difftool (both in the ~/.gitconfig file and with the git config --global --unset command), but the error message above keep displaying when calling git diff . 我还尝试通过删除相对于diffdifftool的每一行来重置git diff配置(都在〜/ .gitconfig文件中并使用git config --global --unset命令),但是上面的错误消息在调用时git config --global --unset显示git diff

Any help would be warmly appreciated! 任何帮助将不胜感激!

In fact I had a reference to winmerge.sh in the PATH. 实际上,我在PATH中引用了winmerge.sh。 Sorry for the bad question! 对不起这个坏问题!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM