gitdiffgit-diffmergetooldifftool

How to use different merge and diff tool in git?


I prefer to use meld as the diff tool. However it doesn't have an option to quickly solve all simple conflicts so in case of merging I'd like to use kdiff3

I've set merge.tool to kdiff3 and diff.guitool to meld but git difftool still always run kdiff3

[merge]
        tool = kdiff3
        conflictstyle = diff3

[diff]
        guitool = meld
        renames = copies
        mnemonicPrefix = true

[difftool]
        prompt = false

How to make git difftool run meld?


Solution

  • diff.guitool only applies if you use the --gui flag.

    Setting diff.tool and merge.tool should make git difftool and git mergetool use different tools:

    [merge]
            tool = kdiff3
    
    [diff]
            tool = meld