使用 .gitconfig 配置差异工具 - Configuring diff tool with .gitconfig

问题:

How do I configure Git to use a different tool for diffing with the .gitconfig file?如何配置 Git 以使用不同的工具与 .gitconfig 文件进行比较?

I have this in my .gitconfig:我的 .gitconfig 中有这个:

[diff]
    tool = git-chdiff #also tried /bin/git-chdiff

It does not work;这是行不通的; it just opens the regular command line diff.它只是打开常规命令行差异。 When I do当我做

export GIT_EXTERNAL_DIFF=git-chdiff

then git diff will open up the external diffing tool (so I know the external diff tool script works fine).然后git diff将打开外部差异工具(所以我知道外部差异工具脚本工作正常)。 Do I have something wrong with my .gitconfig configuration for the diff tool?我的 .gitconfig diff 工具配置有问题吗?


解决方案:

参考一: https://en.stackoom.com/question/QuBg
参考二: https://stackoom.com/question/QuBg
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章