contrib / difftool / git-difftool.txton commit Merge branch 'jk/clone-post-checkout' (869e13e)
   1git-difftool(1)
   2===============
   3
   4NAME
   5----
   6git-difftool - compare changes using common merge tools
   7
   8SYNOPSIS
   9--------
  10'git difftool' [--tool=<tool>] [--no-prompt] ['git diff' options]
  11
  12DESCRIPTION
  13-----------
  14'git-difftool' is a git command that allows you to compare and edit files
  15between 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
  17situations such as when preparing commits or comparing changes against
  18the index.
  19
  20'git difftool' is a frontend to 'git diff' and accepts the same
  21arguments and options.
  22
  23See linkgit:git-diff[1] for the full list of supported options.
  24
  25OPTIONS
  26-------
  27-t <tool>::
  28--tool=<tool>::
  29        Use the merge resolution program specified by <tool>.
  30        Valid merge tools are:
  31        kdiff3, kompare, tkdiff, meld, xxdiff, emerge,
  32        vimdiff, gvimdiff, ecmerge, and opendiff
  33+
  34If a merge resolution program is not specified, 'git-difftool'
  35will use the configuration variable `diff.tool`.  If the
  36configuration variable `diff.tool` is not set, 'git-difftool'
  37will pick a suitable default.
  38+
  39You can explicitly provide a full path to the tool by setting the
  40configuration variable `difftool.<tool>.path`. For example, you
  41can configure the absolute path to kdiff3 by setting
  42`difftool.kdiff3.path`. Otherwise, 'git-difftool' assumes the
  43tool is available in PATH.
  44+
  45Instead of running one of the known merge tool programs,
  46'git-difftool' can be customized to run an alternative program
  47by specifying the command line to invoke in a configuration
  48variable `difftool.<tool>.cmd`.
  49+
  50When 'git-difftool' is invoked with this tool (either through the
  51`-t` or `--tool` option or the `diff.tool` configuration variable)
  52the configured command line will be invoked with the following
  53variables available: `$LOCAL` is set to the name of the temporary
  54file containing the contents of the diff pre-image and `$REMOTE`
  55is set to the name of the temporary file containing the contents
  56of the diff post-image.  `$BASE` is provided for compatibility
  57with custom merge tool commands and has the same value as `$LOCAL`.
  58
  59--no-prompt::
  60        Do not prompt before launching a diff tool.
  61
  62CONFIG VARIABLES
  63----------------
  64'git-difftool' falls back to 'git-mergetool' config variables when the
  65difftool equivalents have not been defined.
  66
  67diff.tool::
  68        The default merge tool to use.
  69
  70difftool.<tool>.path::
  71        Override the path for the given tool.  This is useful in case
  72        your tool is not in the PATH.
  73
  74difftool.<tool>.cmd::
  75        Specify the command to invoke the specified merge tool.
  76+
  77See the `--tool=<tool>` option above for more details.
  78
  79merge.keepBackup::
  80        The original, unedited file content can be saved to a file with
  81        a `.orig` extension.  Defaults to `true` (i.e. keep the backup files).
  82
  83SEE ALSO
  84--------
  85linkgit:git-diff[1]::
  86         Show changes between commits, commit and working tree, etc
  87
  88linkgit:git-mergetool[1]::
  89        Run merge conflict resolution tools to resolve merge conflicts
  90
  91linkgit:git-config[1]::
  92         Get and set repository or global options
  93
  94
  95AUTHOR
  96------
  97Written by David Aguilar <davvid@gmail.com>.
  98
  99Documentation
 100--------------
 101Documentation by David Aguilar and the git-list <git@vger.kernel.org>.
 102
 103GIT
 104---
 105Part of the linkgit:git[1] suite