Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 558
lesolorzanov Avatar asked May 20 '26 02:05

lesolorzanov


1 Answers

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

  • If you used --system, your configuration will have been written to system-wide $(prefix)/etc/gitconfig

  • If you used --global, your configuration will have been written 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.

like image 156
gzh Avatar answered May 21 '26 20:05

gzh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!