0

I changed my git's external diff to meld. I didn't like it. How can I get back to my original state?

As a side question, I didn't like meld because it refused to open tabs for multiple file comparisons. To view changes in different files, meld would start showing the first diff, and only after closing meld, it would reopen with the second file diff.... is there any setting to fix that? thanks.

rahman
  • 4,820
  • 16
  • 52
  • 86

1 Answers1

3

You can change the external diff/merge tool globally in your ~/.gitconfig file, or on a per-repository basis in the /repository/path/here/.git/config file.

For example, if you wish to use kdiff3:

[diff]
    tool = kdiff3
[difftool "kdiff3"]
    path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
    trustexitcode = true
[merge]
    tool = kdiff3
[mergetool "kdiff3"]
    path = /Applications/kdiff3.app/Contents/MacOS/kdiff3
    keepbackup = true
    trustexitcode = true

If you wish to reset these values back to the system default (i.e: not configured), you can remove the above entries from your ~/.gitconfig file or use the git config command with the unset flag for each of the settings e.g; git config --global --unset diff.tool

rmorrin
  • 2,305
  • 1
  • 15
  • 18
  • I am sorry, but the question was, how to "get back to my original state?" what should I use instead of kdiff3 to be be git's default tool? – rahman Nov 07 '14 at 11:28
  • 1
    What platform are you using/how did you initially install git? I don't believe git comes with a default diff tool. You can always unset any configuration option with `git config --global --unset diff.tool` for example. – rmorrin Nov 07 '14 at 15:02
  • 1
    I opened .gitconfig and deleted the diff entry. I guess that is what unset would do. To complete this thread, Could you please include your comment also into your answer? thanks – rahman Nov 08 '14 at 09:44
  • Absolutely, the `--unset` flag will just remove the configuration entries entirely, reverting to the default (unconfigured) state. Many thanks. – rmorrin Nov 09 '14 at 11:28