1

On a sever I'm working on, the git diff behavior has been customized via some lines in $HOME/.gitconfig

[diff]
    renamelimit = 2093
    guitool = diffmerge
    external = $HOME/git-diff-wrapper.sh
    submodule = log

But, in some one-off runs of git add I need the normal default behavior. How do I specify options at the command line to temporarily restore the default behavior, i.e. what do I put after the =s?

git -c diff.guitool= -c external= diff

I tried blanks and '' and it doesn't seem to work. It might have to do with that external is not (or no longer) a documented valid option.

Meng Lu
  • 13,726
  • 12
  • 39
  • 47
  • 1
    For a git command `git foo`, you can use `git -c key=value foo` to specify one or more configuration values which take effect for this run only. For example, `git -c core.pager=more log`, `git -c user.name=me -c user.email=me@xyz.com commit`. – ElpieKay Mar 29 '23 at 02:43
  • @ElpieKay: Thanks! Why not turn it to an answer so I may properly accept it as an answer? – Meng Lu Mar 29 '23 at 04:44
  • Actually, when the default values are desired for all possible options, what would one specify after the `=`s? Just leave blanks (`git -c diff.guitool= diff.external= diff.submodule= diff`)? – Meng Lu Mar 29 '23 at 04:46

0 Answers0