Code

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