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.
82
83       --[no-]trust-exit-code
84           git-difftool invokes a diff tool individually on each file. Errors
85           reported by the diff tool are ignored by default. Use
86           --trust-exit-code to make git-difftool exit when an invoked diff
87           tool returns a non-zero exit code.
88
89           git-difftool will forward the exit code of the invoked tool when
90           --trust-exit-code is used.
91
92       See git-diff(1) for the full list of supported options.
93

CONFIG VARIABLES

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

SEE ALSO

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

GIT

133       Part of the git(1) suite
134
135
136
137Git 2.20.1                        12/15/2018                   GIT-DIFFTOOL(1)
Impressum