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