commit: suggest --amend --reset-author to fix commiter identity
[git/dscho.git] / Documentation / git-difftool.txt
blob573843211112a6efb7b296bbc5b11894c01dd8cd
1 git-difftool(1)
2 ===============
4 NAME
5 ----
6 git-difftool - Show changes using common diff tools
8 SYNOPSIS
9 --------
10 'git difftool' [<options>] <commit>{0,2} [--] [<path>...]
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 --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.
29 -t <tool>::
30 --tool=<tool>::
31         Use the diff tool specified by <tool>.
32         Valid merge tools are:
33         kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
34         ecmerge, diffuse, opendiff, p4merge and araxis.
36 If a diff tool is not specified, 'git difftool'
37 will use the configuration variable `diff.tool`.  If the
38 configuration variable `diff.tool` is not set, 'git difftool'
39 will pick a suitable default.
41 You can explicitly provide a full path to the tool by setting the
42 configuration variable `difftool.<tool>.path`. For example, you
43 can configure the absolute path to kdiff3 by setting
44 `difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the
45 tool is available in PATH.
47 Instead of running one of the known diff tools,
48 'git difftool' can be customized to run an alternative program
49 by specifying the command line to invoke in a configuration
50 variable `difftool.<tool>.cmd`.
52 When 'git difftool' is invoked with this tool (either through the
53 `-t` or `--tool` option or the `diff.tool` configuration variable)
54 the configured command line will be invoked with the following
55 variables available: `$LOCAL` is set to the name of the temporary
56 file containing the contents of the diff pre-image and `$REMOTE`
57 is set to the name of the temporary file containing the contents
58 of the diff post-image.  `$MERGED` is the name of the file which is
59 being compared. `$BASE` is provided for compatibility
60 with custom merge tool commands and has the same value as `$MERGED`.
62 -x <command>::
63 --extcmd=<command>::
64         Specify a custom command for viewing diffs.
65         'git-difftool' ignores the configured defaults and runs
66         `$command $LOCAL $REMOTE` when this option is specified.
67         Additionally, `$BASE` is set in the environment.
69 -g::
70 --gui::
71         When 'git-difftool' is invoked with the `-g` or `--gui` option
72         the default diff tool will be read from the configured
73         `diff.guitool` variable instead of `diff.tool`.
75 See linkgit:git-diff[1] for the full list of supported options.
77 CONFIG VARIABLES
78 ----------------
79 'git difftool' falls back to 'git mergetool' config variables when the
80 difftool equivalents have not been defined.
82 diff.tool::
83         The default diff tool to use.
85 diff.guitool::
86         The default diff tool to use when `--gui` is specified.
88 difftool.<tool>.path::
89         Override the path for the given tool.  This is useful in case
90         your tool is not in the PATH.
92 difftool.<tool>.cmd::
93         Specify the command to invoke the specified diff tool.
95 See the `--tool=<tool>` option above for more details.
97 difftool.prompt::
98         Prompt before each invocation of the diff tool.
100 SEE ALSO
101 --------
102 linkgit:git-diff[1]::
103          Show changes between commits, commit and working tree, etc
105 linkgit:git-mergetool[1]::
106         Run merge conflict resolution tools to resolve merge conflicts
108 linkgit:git-config[1]::
109          Get and set repository or global options
112 AUTHOR
113 ------
114 Written by David Aguilar <davvid@gmail.com>.
116 Documentation
117 --------------
118 Documentation by David Aguilar and the git-list <git@vger.kernel.org>.
122 Part of the linkgit:git[1] suite