1GIT-DIFFTOOL(1)                   Git Manual                   GIT-DIFFTOOL(1)
2
3
4

NAME

6       git-difftool - Show changes using common diff tools
7

SYNOPSIS

9       git difftool [<options>] [<commit> [<commit>]] [--] [<path>...]
10
11

DESCRIPTION

13       git difftool is a Git command that allows you to compare and edit files
14       between revisions using common diff tools. git difftool is a frontend
15       to git diff and accepts the same options and arguments. See git-
16       diff(1).
17

OPTIONS

19       -d, --dir-diff
20           Copy the modified files to a temporary location and perform a
21           directory diff on them. This mode never prompts before launching
22           the diff tool.
23
24       -y, --no-prompt
25           Do not prompt before launching a diff tool.
26
27       --prompt
28           Prompt before each invocation of the diff tool. This is the default
29           behaviour; the option is provided to override any configuration
30           settings.
31
32       -t <tool>, --tool=<tool>
33           Use the diff tool specified by <tool>. Valid values include emerge,
34           kompare, meld, and vimdiff. Run git difftool --tool-help for the
35           list of valid <tool> settings.
36
37           If a diff tool is not specified, git difftool will use the
38           configuration variable diff.tool. If the configuration variable
39           diff.tool is not set, git difftool will pick a suitable default.
40
41           You can explicitly provide a full path to the tool by setting the
42           configuration variable difftool.<tool>.path. For example, you can
43           configure the absolute path to kdiff3 by setting
44           difftool.kdiff3.path. Otherwise, git difftool assumes the tool is
45           available in PATH.
46
47           Instead of running one of the known diff tools, git difftool can be
48           customized to run an alternative program by specifying the command
49           line to invoke in a configuration variable difftool.<tool>.cmd.
50
51           When git difftool is invoked with this tool (either through the -t
52           or --tool option or the diff.tool configuration variable) the
53           configured command line will be invoked with the following
54           variables available: $LOCAL is set to the name of the temporary
55           file containing the contents of the diff pre-image and $REMOTE is
56           set to the name of the temporary file containing the contents of
57           the diff post-image.  $MERGED is the name of the file which is
58           being compared.  $BASE is provided for compatibility with custom
59           merge tool commands and has the same value as $MERGED.
60
61       --tool-help
62           Print a list of diff tools that may be used with --tool.
63
64       --[no-]symlinks
65           git difftool's default behavior is create symlinks to the working
66           tree when run in --dir-diff mode and the right-hand side of the
67           comparison yields the same content as the file in the working tree.
68
69           Specifying --no-symlinks instructs git difftool to create copies
70           instead.  --no-symlinks is the default on Windows.
71
72       -x <command>, --extcmd=<command>
73           Specify a custom command for viewing diffs.  git-difftool ignores
74           the configured defaults and runs $command $LOCAL $REMOTE when this
75           option is specified. Additionally, $BASE is set in the environment.
76
77       -g, --[no-]gui
78           When git-difftool is invoked with the -g or --gui option the
79           default diff tool will be read from the configured diff.guitool
80           variable instead of diff.tool. The --no-gui option can be used to
81           override this setting. If diff.guitool is not set, we will fallback
82           in the order of merge.guitool, diff.tool, merge.tool until a tool
83           is found.
84
85       --[no-]trust-exit-code
86           git-difftool invokes a diff tool individually on each file. Errors
87           reported by the diff tool are ignored by default. Use
88           --trust-exit-code to make git-difftool exit when an invoked diff
89           tool returns a non-zero exit code.
90
91           git-difftool will forward the exit code of the invoked tool when
92           --trust-exit-code is used.
93
94       See git-diff(1) for the full list of supported options.
95

CONFIG VARIABLES

97       git difftool falls back to git mergetool config variables when the
98       difftool equivalents have not been defined.
99
100       diff.tool
101           The default diff tool to use.
102
103       diff.guitool
104           The default diff tool to use when --gui is specified.
105
106       difftool.<tool>.path
107           Override the path for the given tool. This is useful in case your
108           tool is not in the PATH.
109
110       difftool.<tool>.cmd
111           Specify the command to invoke the specified diff tool.
112
113           See the --tool=<tool> option above for more details.
114
115       difftool.prompt
116           Prompt before each invocation of the diff tool.
117
118       difftool.trustExitCode
119           Exit difftool if the invoked diff tool returns a non-zero exit
120           status.
121
122           See the --trust-exit-code option above for more details.
123

SEE ALSO

125       git-diff(1)
126           Show changes between commits, commit and working tree, etc
127
128       git-mergetool(1)
129           Run merge conflict resolution tools to resolve merge conflicts
130
131       git-config(1)
132           Get and set repository or global options
133

GIT

135       Part of the git(1) suite
136
137
138
139Git 2.24.1                        12/10/2019                   GIT-DIFFTOOL(1)
Impressum