6 git-difftool - Show changes using common diff tools
11 'git difftool' [<options>] [<commit> [<commit>]] [--] [<path>...]
15 'git difftool' is a git command that allows you to compare and edit files
16 between revisions using common diff tools. 'git difftool' is a frontend
17 to 'git diff' and accepts the same options and arguments. See
24 Do not prompt before launching a diff tool.
27 Prompt before each invocation of the diff tool.
28 This is the default behaviour; the option is provided to
29 override any configuration settings.
33 Use the diff tool specified by <tool>.
35 araxis, bc3, deltawalker, diffuse, emerge, ecmerge, gvimdiff,
36 kdiff3, kompare, meld, opendiff, p4merge, tkdiff, vimdiff and
39 If a diff tool is not specified, 'git difftool'
40 will use the configuration variable `diff.tool`. If the
41 configuration variable `diff.tool` is not set, 'git difftool'
42 will pick a suitable default.
44 You can explicitly provide a full path to the tool by setting the
45 configuration variable `difftool.<tool>.path`. For example, you
46 can configure the absolute path to kdiff3 by setting
47 `difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the
48 tool is available in PATH.
50 Instead of running one of the known diff tools,
51 'git difftool' can be customized to run an alternative program
52 by specifying the command line to invoke in a configuration
53 variable `difftool.<tool>.cmd`.
55 When 'git difftool' is invoked with this tool (either through the
56 `-t` or `--tool` option or the `diff.tool` configuration variable)
57 the configured command line will be invoked with the following
58 variables available: `$LOCAL` is set to the name of the temporary
59 file containing the contents of the diff pre-image and `$REMOTE`
60 is set to the name of the temporary file containing the contents
61 of the diff post-image. `$MERGED` is the name of the file which is
62 being compared. `$BASE` is provided for compatibility
63 with custom merge tool commands and has the same value as `$MERGED`.
67 Specify a custom command for viewing diffs.
68 'git-difftool' ignores the configured defaults and runs
69 `$command $LOCAL $REMOTE` when this option is specified.
70 Additionally, `$BASE` is set in the environment.
74 When 'git-difftool' is invoked with the `-g` or `--gui` option
75 the default diff tool will be read from the configured
76 `diff.guitool` variable instead of `diff.tool`.
78 See linkgit:git-diff[1] for the full list of supported options.
82 'git difftool' falls back to 'git mergetool' config variables when the
83 difftool equivalents have not been defined.
86 The default diff tool to use.
89 The default diff tool to use when `--gui` is specified.
91 difftool.<tool>.path::
92 Override the path for the given tool. This is useful in case
93 your tool is not in the PATH.
96 Specify the command to invoke the specified diff tool.
98 See the `--tool=<tool>` option above for more details.
101 Prompt before each invocation of the diff tool.
105 linkgit:git-diff[1]::
106 Show changes between commits, commit and working tree, etc
108 linkgit:git-mergetool[1]::
109 Run merge conflict resolution tools to resolve merge conflicts
111 linkgit:git-config[1]::
112 Get and set repository or global options
116 Part of the linkgit:git[1] suite