6 git-difftool - compare changes using common merge tools
10 'git difftool' [--tool=<tool>] [--no-prompt] ['git diff' options]
14 'git-difftool' is a git command that allows you to compare and edit files
15 between revisions using common merge tools. At its most basic level,
16 'git-difftool' does what 'git-mergetool' does but its use is for non-merge
17 situations such as when preparing commits or comparing changes against
20 'git difftool' is a frontend to 'git diff' and accepts the same
21 arguments and options.
23 See linkgit:git-diff[1] for the full list of supported options.
29 Use the merge resolution program specified by <tool>.
30 Valid merge tools are:
31 kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
33 If a merge resolution program is not specified, 'git-difftool'
34 will use the configuration variable `merge.tool`. If the
35 configuration variable `merge.tool` is not set, 'git difftool'
36 will pick a suitable default.
38 You can explicitly provide a full path to the tool by setting the
39 configuration variable `mergetool.<tool>.path`. For example, you
40 can configure the absolute path to kdiff3 by setting
41 `mergetool.kdiff3.path`. Otherwise, 'git-difftool' assumes the
42 tool is available in PATH.
44 Instead of running one of the known merge tool programs,
45 'git-difftool' can be customized to run an alternative program
46 by specifying the command line to invoke in a configuration
47 variable `mergetool.<tool>.cmd`.
49 When 'git-difftool' is invoked with this tool (either through the
50 `-t` or `--tool` option or the `merge.tool` configuration variable)
51 the configured command line will be invoked with the following
52 variables available: `$LOCAL` is set to the name of the temporary
53 file containing the contents of the diff pre-image and `$REMOTE`
54 is set to the name of the temporary file containing the contents
55 of the diff post-image. `$BASE` is provided for compatibility
56 with custom merge tool commands and has the same value as `$LOCAL`.
59 Do not prompt before launching a diff tool.
64 The default merge tool to use.
66 See the `--tool=<tool>` option above for more details.
69 The original, unedited file content can be saved to a file with
70 a `.orig` extension. Defaults to `true` (i.e. keep the backup files).
72 mergetool.<tool>.path::
73 Override the path for the given tool. This is useful in case
74 your tool is not in the PATH.
76 mergetool.<tool>.cmd::
77 Specify the command to invoke the specified merge tool.
79 See the `--tool=<tool>` option above for more details.
85 Show changes between commits, commit and working tree, etc
87 linkgit:git-mergetool[1]::
88 Run merge conflict resolution tools to resolve merge conflicts
90 linkgit:git-config[1]::
91 Get and set repository or global options
96 Written by David Aguilar <davvid@gmail.com>.
100 Documentation by David Aguilar and the git-list <git@vger.kernel.org>.
104 Part of the linkgit:git[1] suite