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).
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.cmd
git config --get mergetool.THE_MERGE_TOOL.trustexitcode
see git help config
git config merge.tool kdiff3
and git config --get merge.tool
returned kdiff3
. I was hoping git would be able to test-launch kdiff3 –
Doxy Check your configurations:
git config --list
Look for the merge.tool
configuration variable.
user.name
, user.email
–
Kata 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
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.
© 2022 - 2024 — McMap. All rights reserved.
error: invalid key: mergetool.THE_MERGE_TOOL
– Kata