2009-01-16 11:00:02 +03:00
|
|
|
git-difftool(1)
|
|
|
|
===============
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
2009-04-07 12:21:19 +04:00
|
|
|
git-difftool - Show changes using common diff tools
|
2009-01-16 11:00:02 +03:00
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
2009-04-07 12:21:22 +04:00
|
|
|
'git difftool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<'git diff' options>]
|
2009-01-16 11:00:02 +03:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
2009-01-19 08:27:19 +03:00
|
|
|
'git-difftool' is a git command that allows you to compare and edit files
|
2009-04-07 12:21:19 +04:00
|
|
|
between revisions using common diff tools. 'git difftool' is a frontend
|
|
|
|
to 'git-diff' and accepts the same options and arguments.
|
2009-01-16 11:00:02 +03:00
|
|
|
|
|
|
|
OPTIONS
|
|
|
|
-------
|
2009-04-07 12:21:19 +04:00
|
|
|
-y::
|
|
|
|
--no-prompt::
|
|
|
|
Do not prompt before launching a diff tool.
|
|
|
|
|
2009-04-07 12:21:22 +04:00
|
|
|
--prompt::
|
|
|
|
Prompt before each invocation of the diff tool.
|
|
|
|
This is the default behaviour; the option is provided to
|
|
|
|
override any configuration settings.
|
|
|
|
|
2009-01-16 11:00:02 +03:00
|
|
|
-t <tool>::
|
|
|
|
--tool=<tool>::
|
2009-04-07 12:21:19 +04:00
|
|
|
Use the diff tool specified by <tool>.
|
2009-01-16 11:00:02 +03:00
|
|
|
Valid merge tools are:
|
2009-04-06 12:31:23 +04:00
|
|
|
kdiff3, kompare, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff,
|
2009-05-24 04:24:41 +04:00
|
|
|
ecmerge, diffuse, opendiff and araxis.
|
2009-01-16 11:00:02 +03:00
|
|
|
+
|
2009-04-07 12:21:19 +04:00
|
|
|
If a diff tool is not specified, 'git-difftool'
|
2009-03-09 12:12:36 +03:00
|
|
|
will use the configuration variable `diff.tool`. If the
|
|
|
|
configuration variable `diff.tool` is not set, 'git-difftool'
|
2009-01-16 11:00:02 +03:00
|
|
|
will pick a suitable default.
|
|
|
|
+
|
|
|
|
You can explicitly provide a full path to the tool by setting the
|
2009-03-09 12:12:36 +03:00
|
|
|
configuration variable `difftool.<tool>.path`. For example, you
|
2009-01-16 11:00:02 +03:00
|
|
|
can configure the absolute path to kdiff3 by setting
|
2009-03-09 12:12:36 +03:00
|
|
|
`difftool.kdiff3.path`. Otherwise, 'git-difftool' assumes the
|
2009-01-16 11:00:02 +03:00
|
|
|
tool is available in PATH.
|
|
|
|
+
|
2009-04-07 12:21:19 +04:00
|
|
|
Instead of running one of the known diff tools,
|
2009-01-19 08:27:19 +03:00
|
|
|
'git-difftool' can be customized to run an alternative program
|
2009-01-16 11:00:02 +03:00
|
|
|
by specifying the command line to invoke in a configuration
|
2009-03-09 12:12:36 +03:00
|
|
|
variable `difftool.<tool>.cmd`.
|
2009-01-16 11:00:02 +03:00
|
|
|
+
|
2009-01-19 08:27:19 +03:00
|
|
|
When 'git-difftool' is invoked with this tool (either through the
|
2009-03-09 12:12:36 +03:00
|
|
|
`-t` or `--tool` option or the `diff.tool` configuration variable)
|
2009-01-16 11:00:02 +03:00
|
|
|
the configured command line will be invoked with the following
|
|
|
|
variables available: `$LOCAL` is set to the name of the temporary
|
|
|
|
file containing the contents of the diff pre-image and `$REMOTE`
|
|
|
|
is set to the name of the temporary file containing the contents
|
|
|
|
of the diff post-image. `$BASE` is provided for compatibility
|
|
|
|
with custom merge tool commands and has the same value as `$LOCAL`.
|
|
|
|
|
2009-04-07 12:21:19 +04:00
|
|
|
See linkgit:git-diff[1] for the full list of supported options.
|
2009-01-16 11:00:02 +03:00
|
|
|
|
|
|
|
CONFIG VARIABLES
|
|
|
|
----------------
|
2009-03-09 12:12:36 +03:00
|
|
|
'git-difftool' falls back to 'git-mergetool' config variables when the
|
|
|
|
difftool equivalents have not been defined.
|
2009-01-16 11:00:02 +03:00
|
|
|
|
2009-03-09 12:12:36 +03:00
|
|
|
diff.tool::
|
2009-04-07 12:21:19 +04:00
|
|
|
The default diff tool to use.
|
2009-01-16 11:00:02 +03:00
|
|
|
|
2009-03-09 12:12:36 +03:00
|
|
|
difftool.<tool>.path::
|
2009-01-16 11:00:02 +03:00
|
|
|
Override the path for the given tool. This is useful in case
|
|
|
|
your tool is not in the PATH.
|
|
|
|
|
2009-03-09 12:12:36 +03:00
|
|
|
difftool.<tool>.cmd::
|
2009-04-07 12:21:19 +04:00
|
|
|
Specify the command to invoke the specified diff tool.
|
2009-01-16 11:00:02 +03:00
|
|
|
+
|
|
|
|
See the `--tool=<tool>` option above for more details.
|
|
|
|
|
2009-04-07 12:21:22 +04:00
|
|
|
difftool.prompt::
|
|
|
|
Prompt before each invocation of the diff tool.
|
|
|
|
|
2009-01-16 11:00:02 +03:00
|
|
|
SEE ALSO
|
|
|
|
--------
|
2009-01-19 08:27:19 +03:00
|
|
|
linkgit:git-diff[1]::
|
2009-01-16 11:00:02 +03:00
|
|
|
Show changes between commits, commit and working tree, etc
|
|
|
|
|
|
|
|
linkgit:git-mergetool[1]::
|
|
|
|
Run merge conflict resolution tools to resolve merge conflicts
|
|
|
|
|
2009-01-19 08:27:19 +03:00
|
|
|
linkgit:git-config[1]::
|
2009-01-16 11:00:02 +03:00
|
|
|
Get and set repository or global options
|
|
|
|
|
|
|
|
|
|
|
|
AUTHOR
|
|
|
|
------
|
|
|
|
Written by David Aguilar <davvid@gmail.com>.
|
|
|
|
|
|
|
|
Documentation
|
|
|
|
--------------
|
|
|
|
Documentation by David Aguilar and the git-list <git@vger.kernel.org>.
|
|
|
|
|
|
|
|
GIT
|
|
|
|
---
|
|
|
|
Part of the linkgit:git[1] suite
|