首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Difftool无法在Windows上使用Git进行比较

Difftool无法在Windows上使用Git进行比较
EN

Stack Overflow用户
提问于 2022-07-31 12:01:43
回答 1查看 90关注 0票数 -3

我已经阅读了所有相关的答案,但仍然无法从我的gitbash2.37.1启动超越比较4,我也遵循了标准指示,从超越比较网站,但它没有帮助,每当我试图推出扩散工具,它只是返回没有启动bc ...any的想法?

根据无法比较的指令,https://www.scootersoftware.com/support.php?zz=kb_vcs

代码语言:javascript
复制
git config --global diff.tool bc
git config --global difftool.bc.path "c:/Program Files/Beyond Compare 4/bcomp.exe"

全局配置文件如下所示

代码语言:javascript
复制
[diff]
    tool = bc
[difftool "bc"]
    path = c:/Program Files/Beyond Compare 4/bcomp.exe
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-31 21:41:32

因此,基本上,如果您已经尝试了一切,并且非常肯定您的全局配置文件和窗口机器上的路径看起来也不错。然后尝试如下所示,因为它可能只是一个初学者的错误,就像我一样,您可能也不知道简单的difftool命令只显示了磁盘上的工作目录和阶段性版本之间的文件差异。如果一切都已经开始了,那么difftool就不会启动,因为没有什么不同之处。

代码语言:javascript
复制
$ echo test_staged >file_test.txt # File modified
$ git add file_test.txt           # Modified file got staged
$ git difftool file_test.txt      # No difference as changes are staged, use file_test.txt if you multiple files in the folder
 or
 $ git difftool                   # if file_test.txt is the only file in the folder

$ echo test_local_copy_without_staged > file_test.txt  # Text file unstaged on your local disc

$ git difftool   # Now you can see the difference between staged and local disc copy

warning: in the working copy of 'file_test.txt', LF will be replaced by CRLF the next time Git touches it

Viewing (1/1): 'file_test.txt'
Launch 'bc' [Y/n]? Y

是的,就是这样,现在你应该看到你的超越比较工具的不同之处了!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73183136

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档