Documentation / git-difftool.txton commit do_for_each_reflog(): use a strbuf to hold logfile name (989c0e5)
   1git-difftool(1)
   2===============
   3
   4NAME
   5----
   6git-difftool - Show changes using common diff tools
   7
   8SYNOPSIS
   9--------
  10[verse]
  11'git difftool' [<options>] [<commit> [<commit>]] [--] [<path>...]
  12
  13DESCRIPTION
  14-----------
  15'git difftool' is a git command that allows you to compare and edit files
  16between revisions using common diff tools.  'git difftool' is a frontend
  17to 'git diff' and accepts the same options and arguments. See
  18linkgit:git-diff[1].
  19
  20OPTIONS
  21-------
  22-y::
  23--no-prompt::
  24        Do not prompt before launching a diff tool.
  25
  26--prompt::
  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.
  30
  31-t <tool>::
  32--tool=<tool>::
  33        Use the diff tool specified by <tool>.
  34        Valid diff tools are:
  35        araxis, bc3, deltawalker, diffuse, emerge, ecmerge, gvimdiff,
  36        kdiff3, kompare, meld, opendiff, p4merge, tkdiff, vimdiff and
  37        xxdiff.
  38+
  39If a diff tool is not specified, 'git difftool'
  40will use the configuration variable `diff.tool`.  If the
  41configuration variable `diff.tool` is not set, 'git difftool'
  42will pick a suitable default.
  43+
  44You can explicitly provide a full path to the tool by setting the
  45configuration variable `difftool.<tool>.path`. For example, you
  46can configure the absolute path to kdiff3 by setting
  47`difftool.kdiff3.path`. Otherwise, 'git difftool' assumes the
  48tool is available in PATH.
  49+
  50Instead of running one of the known diff tools,
  51'git difftool' can be customized to run an alternative program
  52by specifying the command line to invoke in a configuration
  53variable `difftool.<tool>.cmd`.
  54+
  55When 'git difftool' is invoked with this tool (either through the
  56`-t` or `--tool` option or the `diff.tool` configuration variable)
  57the configured command line will be invoked with the following
  58variables available: `$LOCAL` is set to the name of the temporary
  59file containing the contents of the diff pre-image and `$REMOTE`
  60is set to the name of the temporary file containing the contents
  61of the diff post-image.  `$MERGED` is the name of the file which is
  62being compared. `$BASE` is provided for compatibility
  63with custom merge tool commands and has the same value as `$MERGED`.
  64
  65-x <command>::
  66--extcmd=<command>::
  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.
  71
  72-g::
  73--gui::
  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`.
  77
  78See linkgit:git-diff[1] for the full list of supported options.
  79
  80CONFIG VARIABLES
  81----------------
  82'git difftool' falls back to 'git mergetool' config variables when the
  83difftool equivalents have not been defined.
  84
  85diff.tool::
  86        The default diff tool to use.
  87
  88diff.guitool::
  89        The default diff tool to use when `--gui` is specified.
  90
  91difftool.<tool>.path::
  92        Override the path for the given tool.  This is useful in case
  93        your tool is not in the PATH.
  94
  95difftool.<tool>.cmd::
  96        Specify the command to invoke the specified diff tool.
  97+
  98See the `--tool=<tool>` option above for more details.
  99
 100difftool.prompt::
 101        Prompt before each invocation of the diff tool.
 102
 103SEE ALSO
 104--------
 105linkgit:git-diff[1]::
 106         Show changes between commits, commit and working tree, etc
 107
 108linkgit:git-mergetool[1]::
 109        Run merge conflict resolution tools to resolve merge conflicts
 110
 111linkgit:git-config[1]::
 112         Get and set repository or global options
 113
 114GIT
 115---
 116Part of the linkgit:git[1] suite