问题:
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