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