]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-difftool.txt
t7800-difftool: Set a bogus tool for use by tests
[thirdparty/git.git] / Documentation / git-difftool.txt
CommitLineData
5c38ea31
DA
1git-difftool(1)
2===============
3
4NAME
5----
8b733222 6git-difftool - Show changes using common diff tools
5c38ea31
DA
7
8SYNOPSIS
9--------
a904392e 10'git difftool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<'git diff' options>]
5c38ea31
DA
11
12DESCRIPTION
13-----------
507cfcbd 14'git-difftool' is a git command that allows you to compare and edit files
8b733222
DA
15between revisions using common diff tools. 'git difftool' is a frontend
16to 'git-diff' and accepts the same options and arguments.
5c38ea31
DA
17
18OPTIONS
19-------
8b733222
DA
20-y::
21--no-prompt::
22 Do not prompt before launching a diff tool.
23
a904392e
DA
24--prompt::
25 Prompt before each invocation of the diff tool.
26 This is the default behaviour; the option is provided to
27 override any configuration settings.
28
5c38ea31
DA
29-t <tool>::
30--tool=<tool>::
8b733222 31 Use the diff tool specified by <tool>.
5c38ea31 32 Valid merge tools are:
1c0f3d22 33 kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
c8998b48 34 ecmerge, diffuse, opendiff, p4merge and araxis.
5c38ea31 35+
8b733222 36If a diff tool is not specified, 'git-difftool'
2464456a
DA
37will use the configuration variable `diff.tool`. If the
38configuration variable `diff.tool` is not set, 'git-difftool'
5c38ea31
DA
39will pick a suitable default.
40+
41You can explicitly provide a full path to the tool by setting the
2464456a 42configuration variable `difftool.<tool>.path`. For example, you
5c38ea31 43can configure the absolute path to kdiff3 by setting
2464456a 44`difftool.kdiff3.path`. Otherwise, 'git-difftool' assumes the
5c38ea31
DA
45tool is available in PATH.
46+
8b733222 47Instead of running one of the known diff tools,
507cfcbd 48'git-difftool' can be customized to run an alternative program
5c38ea31 49by specifying the command line to invoke in a configuration
2464456a 50variable `difftool.<tool>.cmd`.
5c38ea31 51+
507cfcbd 52When 'git-difftool' is invoked with this tool (either through the
2464456a 53`-t` or `--tool` option or the `diff.tool` configuration variable)
5c38ea31
DA
54the configured command line will be invoked with the following
55variables available: `$LOCAL` is set to the name of the temporary
56file containing the contents of the diff pre-image and `$REMOTE`
57is set to the name of the temporary file containing the contents
58of the diff post-image. `$BASE` is provided for compatibility
59with custom merge tool commands and has the same value as `$LOCAL`.
60
8b733222 61See linkgit:git-diff[1] for the full list of supported options.
5c38ea31
DA
62
63CONFIG VARIABLES
64----------------
2464456a
DA
65'git-difftool' falls back to 'git-mergetool' config variables when the
66difftool equivalents have not been defined.
5c38ea31 67
2464456a 68diff.tool::
8b733222 69 The default diff tool to use.
5c38ea31 70
2464456a 71difftool.<tool>.path::
5c38ea31
DA
72 Override the path for the given tool. This is useful in case
73 your tool is not in the PATH.
74
2464456a 75difftool.<tool>.cmd::
8b733222 76 Specify the command to invoke the specified diff tool.
5c38ea31
DA
77+
78See the `--tool=<tool>` option above for more details.
79
a904392e
DA
80difftool.prompt::
81 Prompt before each invocation of the diff tool.
82
5c38ea31
DA
83SEE ALSO
84--------
507cfcbd 85linkgit:git-diff[1]::
5c38ea31
DA
86 Show changes between commits, commit and working tree, etc
87
88linkgit:git-mergetool[1]::
89 Run merge conflict resolution tools to resolve merge conflicts
90
507cfcbd 91linkgit:git-config[1]::
5c38ea31
DA
92 Get and set repository or global options
93
94
95AUTHOR
96------
97Written by David Aguilar <davvid@gmail.com>.
98
99Documentation
100--------------
101Documentation by David Aguilar and the git-list <git@vger.kernel.org>.
102
103GIT
104---
105Part of the linkgit:git[1] suite