Zloy Smiertniy Zloy Smiertniy - 2 months ago 28
Git Question

Git diff tool reset to git default

I accidentally changed my git diff tool and it was not actually installed and I have no permissions over the machine. How can I revert to the original tool that shows changes in command line? It may sound silly but I have not been able to make a single diff and I have found no information about this, only on how to change it to others than the default. I have tried to unset the variable but it doesn't work.

gzh gzh

This depends on how you changed your git diff tool config when run git config.

  • If you used --system, your configuration will be write to system-wide $(prefix)/etc/gitconfig

  • If yur used --global, your configuration will be write to write to global ~/.gitconfig file

  • The default is to assume the config file of the current repository, .git/config unless defined otherwise with GIT_DIR and GIT_CONFIG

Try to find diff.tool configure value in above files and delete it.