Git cannot find or launch the configured merge tool when attempting to resolve conflicts. This occurs when the tool is not installed, not in PATH, or not properly configured in .gitconfig.
This error appears when you run `git mergetool` to resolve merge conflicts, but Git cannot find the configured merge resolution tool. Git supports various visual merge tools like vimdiff, meld, kdiff3, Beyond Compare, and others to help developers resolve conflicts interactively. When a merge tool is specified in your Git configuration but is unavailable on your system, Git displays this error instead of launching the tool. Git will first check the `merge.tool` configuration variable in your .gitconfig file. If the tool is configured but Git cannot execute it (either because it is not installed, not in your system PATH, or the path is incorrectly specified), this error occurs. The same issue can happen if you explicitly specify a tool with `git mergetool --tool=<name>` but that tool is not available. Starting with Git 2.10+, the exit status handling improved to better identify when a merge tool is missing versus when a merge operation simply found differences between files.
First, see what Git recognizes as available:
git mergetool --tool-helpThis will show two lists: tools that are currently available, and tools that are valid but not currently available. This helps you identify if your configured tool is detected.
View what merge tool Git is configured to use:
git config --global merge.toolIf this returns nothing, Git will try to auto-detect an available tool. If it returns a tool name, verify that tool is installed.
Install one of the supported merge tools based on your platform:
Ubuntu/Debian:
sudo apt install meld
# or
sudo apt install kdiff3macOS:
brew install meld
# or
brew install kdiff3Windows:
Download and install from official websites:
- Meld: https://meldmerge.org/
- KDiff3: https://kdiff3.sourceforge.net/
- Beyond Compare: https://www.scootersoftware.com/
For Windows, remember the installation path for the next step.
Set your merge tool in Git configuration:
git config --global merge.tool meldFor vimdiff (usually pre-installed on Linux/macOS):
git config --global merge.tool vimdiffFor kdiff3:
git config --global merge.tool kdiff3If the tool is installed but not in your system PATH, specify its full path:
Windows example for KDiff3:
git config --global mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"Windows example for Meld:
git config --global mergetool.meld.path "C:/Program Files (x86)/Meld/Meld.exe"macOS/Linux example:
git config --global mergetool.meld.path /usr/local/bin/meldNote: Use forward slashes even on Windows in Git config.
Test that the tool can be executed directly:
meld --version
# or
kdiff3 --versionIf this fails, the tool is not in your PATH. Either add it to PATH or use the explicit path configuration from step 5.
Now attempt to resolve your merge conflicts:
git mergetoolThe configured tool should launch with your conflicting files loaded for visual resolution.
Using vimdiff without installation: On most Linux and macOS systems, vim/vimdiff is already installed. Setting git config --global merge.tool vimdiff is the fastest way to get started without installing additional software. Vimdiff uses a 4-window layout showing LOCAL, BASE, REMOTE, and MERGED versions of the conflicting file.
Custom merge tools: You can configure Git to use any custom tool by setting mergetool.<tool>.cmd to specify the exact command line to invoke. This is useful for proprietary or company-specific merge tools.
Suppressing prompts: Add git config --global mergetool.prompt false to skip the "Launch merge tool?" confirmation prompt before each file.
Keeping backups: By default, Git creates .orig backup files when running mergetool. Disable this with git config --global mergetool.keepBackup false to automatically clean up these files after successful merges.
Meld auto-merge: For Meld users, enable auto-merge feature with git config --global mergetool.meld.useAutoMerge true to let Meld automatically resolve non-conflicting changes.
Diff3 conflict style: Set git config --global merge.conflictstyle diff3 to show the common ancestor version in conflict markers, which helps understand what both sides changed.
Windows PATH issues: On Windows, if you installed a tool but it is not recognized, you may need to add its installation directory to your system PATH environment variable, or use the explicit path configuration method shown in step 5.
kex_exchange_identification: Connection closed by remote host
Connection closed by remote host when connecting to Git server
fatal: unable to access: Proxy auto-configuration failed
How to fix 'Proxy auto-configuration failed' in Git
fatal: unable to access: Authentication failed (proxy requires basic auth)
How to fix 'Authentication failed (proxy requires basic auth)' in Git
fatal: unable to access: no_proxy configuration not working
How to fix 'no_proxy configuration not working' in Git
fatal: unable to read tree object in treeless clone
How to fix 'unable to read tree object in treeless clone' in Git