问题
Is there any way to change the default diff tool in gitbash?
This post seems to suggest it is possible but they provided no command line examples. Link: Running NotePad++ from Command line with Compare Plugin showing compare result
回答1:
Since the official diff plugin for Notepad++ seems to be uph0/compare, a possible setting could be:
$ git config --global --add diff.guitool nppdiff
$ git config --global --add difftool.nppdiff.path "C:/Program Files/Notepad++/plugins/ComparePlugin/compare.exe"
$ git config --global --add difftool.nppdiff.trustExitCode false
来源:https://stackoverflow.com/questions/38823392/how-do-i-use-notepad-compare-as-the-diff-tool-in-git-bash-command-line