For your general question: pretty much all options can be overridden on the command line using -c
:
-c <name>=<value>
Pass a configuration parameter to the command. The value given will override values from configuration files. The <name> is expected in the same format as listed by git config (subkeys separated by dots).
That said, diff.external
is a problem. You can change its value, but there is no way to unset it on the command line (that I can see). However, git diff
does have a custom option to ignore the diff.external
setting: you can use
git diff --no-ext-diff