[![Git](https://git-scm.com/images/logo@2x.png)](https://git-scm.com/) --distributed-is-the-new-centralized
![](https://git-scm.com/images/dark-mode.svg)
  * [About](https://git-scm.com/about)
    * [Trademark](https://git-scm.com/about/trademark)
  * [Learn](https://git-scm.com/learn)
    * [Book](https://git-scm.com/book)
    * [Cheat Sheet](https://git-scm.com/cheat-sheet)
    * [Videos](https://git-scm.com/videos)
    * [External Links](https://git-scm.com/doc/ext)
  * [Tools](https://git-scm.com/tools)
    * [Command Line](https://git-scm.com/tools/command-line)
    * [GUIs](https://git-scm.com/tools/guis)
    * [Hosting](https://git-scm.com/tools/hosting)
  * [Reference](https://git-scm.com/docs)
  * [Install](https://git-scm.com/install/linux)
  * [Community](https://git-scm.com/community)


  * Table of Contents
    * [NAME](https://git-scm.com/docs/git-difftool#_name)
    * [SYNOPSIS](https://git-scm.com/docs/git-difftool#_synopsis)
    * [DESCRIPTION](https://git-scm.com/docs/git-difftool#_description)
    * [OPTIONS](https://git-scm.com/docs/git-difftool#_options)
    * [CONFIGURATION](https://git-scm.com/docs/git-difftool#_configuration)
    * [SEE ALSO](https://git-scm.com/docs/git-difftool#_see_also)
    * [GIT](https://git-scm.com/docs/git-difftool#_git)


[ English ▾](https://git-scm.com/docs/git-difftool)
Localized versions of **git-difftool** manual
  1. [English ](https://git-scm.com/docs/git-difftool)
  2. [Français ](https://git-scm.com/docs/git-difftool/fr)
  3. [Português (Brasil) ](https://git-scm.com/docs/git-difftool/pt_BR)
  4. [Русский ](https://git-scm.com/docs/git-difftool/ru)
  5. [Svenska ](https://git-scm.com/docs/git-difftool/sv)
  6. [українська мова ](https://git-scm.com/docs/git-difftool/uk)
  7. [简体中文 ](https://git-scm.com/docs/git-difftool/zh_HANS-CN)

Want to read in your language or fix typos?
[You can help translate this page](https://github.com/jnavila/git-manpages-l10n).
[Topics ▾](https://git-scm.com/docs/git-difftool)
### Setup and Config
  * [ git ](https://git-scm.com/docs/git)
  * [ config ](https://git-scm.com/docs/git-config)
  * [ help ](https://git-scm.com/docs/git-help)
  * [ bugreport ](https://git-scm.com/docs/git-bugreport)
  * [ Credential helpers ](https://git-scm.com/doc/credential-helpers)


### Getting and Creating Projects
  * [ init ](https://git-scm.com/docs/git-init)
  * [ clone ](https://git-scm.com/docs/git-clone)


### Basic Snapshotting
  * [ add ](https://git-scm.com/docs/git-add)
  * [ status ](https://git-scm.com/docs/git-status)
  * [ diff ](https://git-scm.com/docs/git-diff)
  * [ commit ](https://git-scm.com/docs/git-commit)
  * [ notes ](https://git-scm.com/docs/git-notes)
  * [ restore ](https://git-scm.com/docs/git-restore)
  * [ reset ](https://git-scm.com/docs/git-reset)
  * [ rm ](https://git-scm.com/docs/git-rm)
  * [ mv ](https://git-scm.com/docs/git-mv)


### Branching and Merging
  * [ branch ](https://git-scm.com/docs/git-branch)
  * [ checkout ](https://git-scm.com/docs/git-checkout)
  * [ switch ](https://git-scm.com/docs/git-switch)
  * [ merge ](https://git-scm.com/docs/git-merge)
  * [ mergetool ](https://git-scm.com/docs/git-mergetool)
  * [ log ](https://git-scm.com/docs/git-log)
  * [ stash ](https://git-scm.com/docs/git-stash)
  * [ tag ](https://git-scm.com/docs/git-tag)
  * [ worktree ](https://git-scm.com/docs/git-worktree)


### Sharing and Updating Projects
  * [ fetch ](https://git-scm.com/docs/git-fetch)
  * [ pull ](https://git-scm.com/docs/git-pull)
  * [ push ](https://git-scm.com/docs/git-push)
  * [ remote ](https://git-scm.com/docs/git-remote)
  * [ submodule ](https://git-scm.com/docs/git-submodule)


### Inspection and Comparison
  * [ show ](https://git-scm.com/docs/git-show)
  * [ log ](https://git-scm.com/docs/git-log)
  * [ diff ](https://git-scm.com/docs/git-diff)
  * [ difftool ](https://git-scm.com/docs/git-difftool)
  * [ range-diff ](https://git-scm.com/docs/git-range-diff)
  * [ shortlog ](https://git-scm.com/docs/git-shortlog)
  * [ describe ](https://git-scm.com/docs/git-describe)


### Patching
  * [ apply ](https://git-scm.com/docs/git-apply)
  * [ cherry-pick ](https://git-scm.com/docs/git-cherry-pick)
  * [ diff ](https://git-scm.com/docs/git-diff)
  * [ rebase ](https://git-scm.com/docs/git-rebase)
  * [ revert ](https://git-scm.com/docs/git-revert)


### Debugging
  * [ bisect ](https://git-scm.com/docs/git-bisect)
  * [ blame ](https://git-scm.com/docs/git-blame)
  * [ grep ](https://git-scm.com/docs/git-grep)


### Email
  * [ am ](https://git-scm.com/docs/git-am)
  * [ apply ](https://git-scm.com/docs/git-apply)
  * [ imap-send ](https://git-scm.com/docs/git-imap-send)
  * [ format-patch ](https://git-scm.com/docs/git-format-patch)
  * [ send-email ](https://git-scm.com/docs/git-send-email)
  * [ request-pull ](https://git-scm.com/docs/git-request-pull)


### External Systems
  * [ svn ](https://git-scm.com/docs/git-svn)
  * [ fast-import ](https://git-scm.com/docs/git-fast-import)


### Server Admin
  * [ daemon ](https://git-scm.com/docs/git-daemon)
  * [ update-server-info ](https://git-scm.com/docs/git-update-server-info)


### Guides
  * [ gitattributes ](https://git-scm.com/docs/gitattributes)
  * [ Command-line interface conventions ](https://git-scm.com/docs/gitcli)
  * [ Everyday Git ](https://git-scm.com/docs/giteveryday)
  * [ Frequently Asked Questions (FAQ) ](https://git-scm.com/docs/gitfaq)
  * [ Glossary ](https://git-scm.com/docs/gitglossary)
  * [ Hooks ](https://git-scm.com/docs/githooks)
  * [ gitignore ](https://git-scm.com/docs/gitignore)
  * [ gitmodules ](https://git-scm.com/docs/gitmodules)
  * [ Revisions ](https://git-scm.com/docs/gitrevisions)
  * [ Submodules ](https://git-scm.com/docs/gitsubmodules)
  * [ Tutorial ](https://git-scm.com/docs/gittutorial)
  * [ Workflows ](https://git-scm.com/docs/gitworkflows)
  * [ All guides... ](https://git-scm.com/docs/git#_guides)


### Administration
  * [ clean ](https://git-scm.com/docs/git-clean)
  * [ gc ](https://git-scm.com/docs/git-gc)
  * [ fsck ](https://git-scm.com/docs/git-fsck)
  * [ reflog ](https://git-scm.com/docs/git-reflog)
  * [ filter-branch ](https://git-scm.com/docs/git-filter-branch)
  * [ instaweb ](https://git-scm.com/docs/git-instaweb)
  * [ archive ](https://git-scm.com/docs/git-archive)
  * [ bundle ](https://git-scm.com/docs/git-bundle)


### Plumbing Commands
  * [ cat-file ](https://git-scm.com/docs/git-cat-file)
  * [ check-ignore ](https://git-scm.com/docs/git-check-ignore)
  * [ checkout-index ](https://git-scm.com/docs/git-checkout-index)
  * [ commit-tree ](https://git-scm.com/docs/git-commit-tree)
  * [ count-objects ](https://git-scm.com/docs/git-count-objects)
  * [ diff-index ](https://git-scm.com/docs/git-diff-index)
  * [ for-each-ref ](https://git-scm.com/docs/git-for-each-ref)
  * [ hash-object ](https://git-scm.com/docs/git-hash-object)
  * [ ls-files ](https://git-scm.com/docs/git-ls-files)
  * [ ls-tree ](https://git-scm.com/docs/git-ls-tree)
  * [ merge-base ](https://git-scm.com/docs/git-merge-base)
  * [ read-tree ](https://git-scm.com/docs/git-read-tree)
  * [ rev-list ](https://git-scm.com/docs/git-rev-list)
  * [ rev-parse ](https://git-scm.com/docs/git-rev-parse)
  * [ show-ref ](https://git-scm.com/docs/git-show-ref)
  * [ symbolic-ref ](https://git-scm.com/docs/git-symbolic-ref)
  * [ update-index ](https://git-scm.com/docs/git-update-index)
  * [ update-ref ](https://git-scm.com/docs/git-update-ref)
  * [ verify-pack ](https://git-scm.com/docs/git-verify-pack)
  * [ write-tree ](https://git-scm.com/docs/git-write-tree)


[ Latest version ▾ ](https://git-scm.com/docs/git-difftool) git-difftool last updated in 2.52.0
Changes in the **git-difftool** manual
  1. 2.53.0 no changes
  2. [2.52.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2025-11-17_ ](https://git-scm.com/docs/git-difftool/2.52.0)
  3. 2.49.1 → 2.51.2 no changes
  4. [2.49.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2025-03-14_ ](https://git-scm.com/docs/git-difftool/2.49.0)
  5. 2.45.1 → 2.48.2 no changes
  6. 2.45.0 no changes
  7. 2.44.1 → 2.44.4 no changes
  8. [2.44.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2024-02-23_ ](https://git-scm.com/docs/git-difftool/2.44.0)
  9. 2.43.1 → 2.43.7 no changes
  10. [2.43.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2023-11-20_ ](https://git-scm.com/docs/git-difftool/2.43.0)
  11. 2.41.1 → 2.42.4 no changes
  12. [2.41.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2023-06-01_ ](https://git-scm.com/docs/git-difftool/2.41.0)
  13. 2.38.1 → 2.40.4 no changes
  14. [2.38.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2022-10-02_ ](https://git-scm.com/docs/git-difftool/2.38.0)
  15. 2.31.1 → 2.37.7 no changes
  16. [2.31.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2021-03-15_ ](https://git-scm.com/docs/git-difftool/2.31.0)
  17. 2.22.1 → 2.30.9 no changes
  18. [2.22.0 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2019-06-07_ ](https://git-scm.com/docs/git-difftool/2.22.0)
  19. 2.13.7 → 2.21.4 no changes
  20. [2.12.5 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2017-09-22_ ](https://git-scm.com/docs/git-difftool/2.12.5)
  21. 2.10.5 → 2.11.4 no changes
  22. [2.9.5 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2017-07-30_ ](https://git-scm.com/docs/git-difftool/2.9.5)
  23. 2.3.10 → 2.8.6 no changes
  24. [2.2.3 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2015-09-04_ ](https://git-scm.com/docs/git-difftool/2.2.3)
  25. 2.1.4 no changes
  26. [2.0.5 ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/green-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/red-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) ![](https://git-scm.com/images/icons/grey-dot.png) _2014-12-17_ ](https://git-scm.com/docs/git-difftool/2.0.5)


Check your version of git by running
`git --version`
##  [](https://git-scm.com/docs/git-difftool#_name)NAME
git-difftool - Show changes using common diff tools
##  [](https://git-scm.com/docs/git-difftool#_synopsis)SYNOPSIS
```
_git difftool_ [<options>] [<commit> [<commit>]] [--] [<path>…​]
```

##  [](https://git-scm.com/docs/git-difftool#_description)DESCRIPTION
_git difftool_ is a Git command that allows you to compare and edit files between revisions using common diff tools. _git difftool_ is a frontend to _git diff_ and accepts the same options and arguments. See [git-diff[1]](https://git-scm.com/docs/git-diff).
##  [](https://git-scm.com/docs/git-difftool#_options)OPTIONS

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt--d)-d


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---dir-diff)--dir-diff

Copy the modified files to a temporary location and perform a directory diff on them. This mode never prompts before launching the diff tool.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt--y)-y


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---no-prompt)--no-prompt

Do not prompt before launching a diff tool.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---prompt)--prompt

Prompt before each invocation of the diff tool. This is the default behaviour; the option is provided to override any configuration settings.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---rotate-tofile)--rotate-to=<file>

Start showing the diff for the given path, the paths before it will move to the end and output.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---skip-tofile)--skip-to=<file>

Start showing the diff for the given path, skipping all the paths before it.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt--ttool)-t <tool>


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---tooltool)--tool=<tool>

Use the diff tool specified by <tool>. Valid values include emerge, kompare, meld, and vimdiff. Run `git` `difftool` `--tool-help` for the list of valid <tool> settings.
If a diff tool is not specified, _git difftool_ will use the configuration variable `diff.tool`. If the configuration variable `diff.tool` is not set, _git difftool_ will pick a suitable default.
You can explicitly provide a full path to the tool by setting the configuration variable `difftool.`_< tool>_`.path`. For example, you can configure the absolute path to kdiff3 by setting `difftool.kdiff3.path`. Otherwise, _git difftool_ assumes the tool is available in PATH.
Instead of running one of the known diff tools, _git difftool_ can be customized to run an alternative program by specifying the command line to invoke in a configuration variable `difftool.`_< tool>_`.cmd`.
When _git difftool_ is invoked with this tool (either through the `-t` or `--tool` option or the `diff.tool` configuration variable) the configured command line will be invoked with the following variables available: `$LOCAL` is set to the name of the temporary file containing the contents of the diff pre-image and `$REMOTE` is set to the name of the temporary file containing the contents of the diff post-image. `$MERGED` is the name of the file which is being compared. `$BASE` is provided for compatibility with custom merge tool commands and has the same value as `$MERGED`.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---tool-help)--tool-help

Print a list of diff tools that may be used with `--tool`.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---symlinks)--symlinks


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---no-symlinks)--no-symlinks

_git difftool_ 's default behavior is to create symlinks to the working tree when run in `--dir-diff` mode and the right-hand side of the comparison yields the same content as the file in the working tree.
Specifying `--no-symlinks` instructs _git difftool_ to create copies instead. `--no-symlinks` is the default on Windows.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt--xcommand)-x <command>


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---extcmdcommand)--extcmd=<command>

Specify a custom command for viewing diffs. _git-difftool_ ignores the configured defaults and runs _< command>_ `$LOCAL` `$REMOTE` when this option is specified. Additionally, `$BASE` is set in the environment.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt--g)-g


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---gui)--gui


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---no-gui)--no-gui

When _git-difftool_ is invoked with the `-g` or `--gui` option the default diff tool will be read from the configured `diff.guitool` variable instead of `diff.tool`. This may be selected automatically using the configuration variable `difftool.guiDefault`. The `--no-gui` option can be used to override these settings. If `diff.guitool` is not set, we will fallback in the order of `merge.guitool`, `diff.tool`, `merge.tool` until a tool is found.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---trust-exit-code)--trust-exit-code


[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt---no-trust-exit-code)--no-trust-exit-code

Errors reported by the diff tool are ignored by default. Use `--trust-exit-code` to make _git-difftool_ exit when an invoked diff tool returns a non-zero exit code.
_git-difftool_ will forward the exit code of the invoked tool when `--trust-exit-code` is used.
See [git-diff[1]](https://git-scm.com/docs/git-diff) for the full list of supported options.
##  [](https://git-scm.com/docs/git-difftool#_configuration)CONFIGURATION
_git difftool_ falls back to _git mergetool_ config variables when the difftool equivalents have not been defined.
Everything above this line in this section isn’t included from the [git-config[1]](https://git-scm.com/docs/git-config) documentation. The content that follows is the same as what’s found there:

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-difftool)diff.tool

Controls which diff tool is used by [git-difftool[1]](https://git-scm.com/docs/git-difftool). This variable overrides the value configured in `merge.tool`. The list below shows the valid built-in values. Any other value is treated as a custom diff tool and requires that a corresponding difftool.<tool>.cmd variable is defined.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-diffguitool)diff.guitool

Controls which diff tool is used by [git-difftool[1]](https://git-scm.com/docs/git-difftool) when the -g/--gui flag is specified. This variable overrides the value configured in `merge.guitool`. The list below shows the valid built-in values. Any other value is treated as a custom diff tool and requires that a corresponding difftool.<guitool>.cmd variable is defined.
  * araxis
  * bc
  * codecompare
  * deltawalker
  * diffmerge
  * diffuse
  * ecmerge
  * emerge
  * examdiff
  * guiffy
  * gvimdiff
  * kdiff3
  * kompare
  * meld
  * nvimdiff
  * opendiff
  * p4merge
  * smerge
  * tkdiff
  * vimdiff
  * vscode
  * winmerge
  * xxdiff



[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-difftooltoolcmd)difftool.<tool>.cmd

Specify the command to invoke the specified diff tool. The specified command is evaluated in shell with the following variables available: _LOCAL_ is set to the name of the temporary file containing the contents of the diff pre-image and _REMOTE_ is set to the name of the temporary file containing the contents of the diff post-image.
See the `--tool=`_< tool>_ option in [git-difftool[1]](https://git-scm.com/docs/git-difftool) for more details.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-difftooltoolpath)difftool.<tool>.path

Override the path for the given tool. This is useful in case your tool is not in the PATH.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-difftooltrustExitCode)difftool.trustExitCode

Exit difftool if the invoked diff tool returns a non-zero exit status.
See the `--trust-exit-code` option in [git-difftool[1]](https://git-scm.com/docs/git-difftool) for more details.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-difftoolprompt)difftool.prompt

Prompt before each invocation of the diff tool.

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-difftoolguiDefault)difftool.guiDefault

Set `true` to use the `diff.guitool` by default (equivalent to specifying the `--gui` argument), or `auto` to select `diff.guitool` or `diff.tool` depending on the presence of a `DISPLAY` environment variable value. The default is `false`, where the `--gui` argument must be provided explicitly for the `diff.guitool` to be used.
##  [](https://git-scm.com/docs/git-difftool#_see_also)SEE ALSO

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-git-diff1)[git-diff[1]](https://git-scm.com/docs/git-diff)

Show changes between commits, commit and working tree, etc

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-git-mergetool1)[git-mergetool[1]](https://git-scm.com/docs/git-mergetool)

Run merge conflict resolution tools to resolve merge conflicts

[](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-git-config1)[git-config[1]](https://git-scm.com/docs/git-config)

Get and set repository or global options
##  [](https://git-scm.com/docs/git-difftool#_git)GIT
Part of the [git[1]](https://git-scm.com/docs/git) suite
### difftool
[About this site](https://git-scm.com/site)
Patches, suggestions, and comments are welcome.
Git is a member of [Software Freedom Conservancy](https://git-scm.com/sfc)
