使用 .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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章