How do I check which merge tool I use?

10,125

Solution 1

to see what git resolves as the difftool, over the different config files:

git config --get merge.tool

If the result is not a builtin, then to see how it is configured:

git config --get mergetool.THE_MERGE_TOOL

see git help config

Solution 2

Check your configurations:

git config --list

Look for the merge.tool configuration variable.

Solution 3

You can check it in your git config file: project local config file is at: .git/config global config file is at:/home/user/.gitconfig(only for linux and mac os) what config file looks like:

[user]
   name = name
   email = [email protected]
[color]
   ui = auto
[mergetool "[tool]"]
   cmd = vimdiff

You can use git mergetool --tool-help to show avilable merge tools. like this:

 'git mergetool --tool=<tool>' may be set to one of the following:
    emerge
    gvimdiff
    gvimdiff2
    gvimdiff3
    vimdiff
    vimdiff2
    vimdiff3

Solution 4

In your Git configuration file (typically located at ~/.gitconfig), there is a section prefixed with [mergetool]. e.g.:

[mergetool "[tool]"]
    cmd = opendiff

The cmd tells you (and--more importantly--git itself) what command to use for mergetool. In my case, it's opendiff.

Knowing this, you can view the man pages for your tool to determine what its version number is.

Share:
10,125
kiedysktos
Author by

kiedysktos

Updated on June 07, 2022

Comments

  • kiedysktos
    kiedysktos about 2 years

    I want to check which merge tool my git is set to - I just don't remember the name. I know I can wait till the next merge opportunity to run it via git merge tool and see what was it, but I'd like to type something like git mergetool status to see what is the tool (and what is the version, for instance).

  • techkuz
    techkuz about 5 years
    first gives nothing, second: error: invalid key: mergetool.THE_MERGE_TOOL
  • techkuz
    techkuz about 5 years
    have only user.name, user.email
  • Someone Somewhere
    Someone Somewhere almost 5 years
    I had previously set it to kdiff3 with git config merge.tool kdiff3 and git config --get merge.tool returned kdiff3. I was hoping git would be able to test-launch kdiff3