How to fix diff tool 'vimdiff' is not available in Git

GitBEGINNERLOWUpdated Dec 2, 2025ยท 155 views

Git cannot locate the configured diff tool in your PATH or the tool is not installed. This prevents git difftool from launching the visual diff application.

Quick fix

Fixes diff tool 'vimdiff' is not available

git config --get diff.tool
  1. Check which diff tool is configured
  2. Verify the tool is installed
  3. Install your preferred diff tool
  4. Configure Git to use your installed tool
git โ€” error
git config --get diff.tool
diff tool 'vimdiff' is not available

What this error means

This error occurs when Git's difftool command cannot find or execute the diff tool you've configured (or the default tool it's trying to use). Git difftool is a frontend to git diff that allows you to compare files using external graphical or text-based diff applications like vimdiff, meld, Beyond Compare, or other tools. When you run `git difftool`, Git looks for the configured tool in several places: first in the `diff.tool` configuration variable, then checks if that tool is available in your system PATH, and finally attempts to execute it. If the tool binary doesn't exist, isn't executable, or the path is incorrectly configured, Git fails with this error. This is particularly common after fresh Git installations, when switching between operating systems, or when a diff tool has been uninstalled or moved to a different location.

Typical symptoms

  • git difftool command fails with 'tool is not available' message
  • Error message mentions specific tool name like vimdiff, meld, or bc3
  • git diff works normally but git difftool does not
  • Prompt appears but no visual diff tool launches
  • Error: 'cannot run git-difftool--helper: No such file or directory'
  • Windows users see path-related errors with spaces in Program Files

Common causes

  1. The diff tool (vimdiff, meld, etc.) is not installed on your system
  2. The tool is installed but not in your system PATH environment variable
  3. Git config points to an incorrect tool name or path
  4. difftool.<tool>.path is configured with an invalid or outdated path
  5. Only git-core package installed without full git package (Linux/IUS repos)
  6. Tool was uninstalled or moved after being configured
  7. Windows path contains spaces and is not properly quoted in config
  8. Using a custom tool without defining difftool.<tool>.cmd variable

How to fix "diff tool 'vimdiff' is not available"

1Check which diff tool is configured

First, see what Git is trying to use:

bash
git config --get diff.tool

If this returns nothing, Git will try to use a default tool. To see all available built-in tools, run:

bash
git difftool --tool-help

This shows which tools Git recognizes and which are currently available on your system.

2Verify the tool is installed

Check if your diff tool is actually installed and accessible:

bash
# For vimdiff (vim)
vim --version

# For meld
meld --version

# For Beyond Compare (Windows)
bcomp /?

# Generic check if tool is in PATH
which vimdiff  # Linux/macOS
where meld     # Windows

If the command is not found, you need to install the tool first.

3Install your preferred diff tool

Install the diff tool if it's missing:

Ubuntu/Debian:

bash
sudo apt update
sudo apt install vim        # for vimdiff
sudo apt install meld       # for meld

macOS:

bash
brew install vim
brew install meld

Windows:
- Download and install [Meld](https://meldmerge.org/)
- Or [Beyond Compare](https://www.scootersoftware.com/)
- Or use vim from [Git for Windows](https://gitforwindows.org/) (includes vimdiff)

Red Hat/CentOS/Fedora:

bash
sudo yum install vim-enhanced
sudo yum install meld
4Configure Git to use your installed tool

Set the diff tool in your Git configuration:

For vimdiff:

bash
git config --global diff.tool vimdiff
git config --global difftool.prompt false

For meld:

bash
git config --global diff.tool meld
git config --global difftool.prompt false

For Beyond Compare 3:

bash
git config --global diff.tool bc3
git config --global difftool.prompt false

The difftool.prompt false setting prevents Git from asking for confirmation before launching the tool each time.

5Set explicit path if tool is not in PATH

If the tool is installed but not in your system PATH, configure the full path:

Windows (Beyond Compare 4):

bash
git config --global difftool.bc3.path 'C:/Program Files/Beyond Compare 4/bcomp.exe'

Windows (Meld):

bash
git config --global difftool.meld.path 'C:/Program Files/Meld/Meld.exe'

macOS/Linux (custom location):

bash
git config --global difftool.meld.path '/usr/local/bin/meld'

Note: Use forward slashes (/) even on Windows, or escape backslashes properly.

6Test the configuration

Verify git difftool now works:

bash
# Make a change to a tracked file
echo 'test change' >> README.md

# Try launching difftool
git difftool

Your configured diff tool should open and display the changes. If you want to see all changes in directory diff mode:

bash
git difftool -d

This copies modified files to a temp location and shows a directory comparison, which is more efficient for reviewing many files.

Advanced notes

For custom diff tools: If you're using a tool that isn't built into Git's list, you need to define both the tool name and the command to run. For example, for a custom tool called 'customdiff':

bash
git config --global diff.tool customdiff
git config --global difftool.customdiff.cmd 'customdiff "$LOCAL" "$REMOTE"'

Git provides $LOCAL and $REMOTE variables that point to temporary files containing the pre-image and post-image of your diff.

GUI vs CLI tools: If you want different tools for GUI and command-line contexts, use diff.guitool and the --gui or -g flag:

bash
git config --global diff.guitool meld
git config --global diff.tool vimdiff
git difftool --gui  # uses meld
git difftool       # uses vimdiff

Handling exit codes: By default, Git ignores errors from the diff tool. If you want Git to respect the tool's exit code (useful for scripting):

bash
git config --global difftool.trustExitCode true

Linux IUS repositories: If you installed git from IUS repositories and see "cannot run git-difftool--helper", you likely only have git-core installed. Install the full git package:

bash
sudo yum install git222  # or your git version

Viewing your entire difftool config:

bash
git config --global --get-regexp difftool
git config --global --get-regexp 'diff\.tool'

Frequently asked questions

What does "diff tool 'vimdiff' is not available" mean?
This error occurs when Git's difftool command cannot find or execute the diff tool you've configured (or the default tool it's trying to use). Git difftool is a frontend to git diff that allows you to compare files using external graphical or text-based diff applications like vimdiff, meld, Beyond Compare, or other tools. tool configuration variable, then checks if that tool is available in your system PATH, and finally attempts to execute it.
How do I fix "diff tool 'vimdiff' is not available"?
Git cannot locate the configured diff tool in your PATH or the tool is not installed. This prevents git difftool from launching the visual diff application.
What causes "diff tool 'vimdiff' is not available"?
The diff tool (vimdiff, meld, etc.) is not installed on your system The tool is installed but not in your system PATH environment variable Git config points to an incorrect tool name or path
Is the "diff tool 'vimdiff' is not available" error serious?
It is a low-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading