Documentation / git-mergetool.txton commit Merge branch 'jc/reflog-expire' into maint (7be9467)
   1git-mergetool(1)
   2================
   3
   4NAME
   5----
   6git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
   7
   8SYNOPSIS
   9--------
  10'git-mergetool' [--tool=<tool>] [<file>]...
  11
  12DESCRIPTION
  13-----------
  14
  15Use `git mergetool` to run one of several merge utilities to resolve
  16merge conflicts.  It is typically run after linkgit:git-merge[1].
  17
  18If one or more <file> parameters are given, the merge tool program will
  19be run to resolve differences on each file.  If no <file> names are
  20specified, `git mergetool` will run the merge tool program on every file
  21with merge conflicts.
  22
  23OPTIONS
  24-------
  25-t or --tool=<tool>::
  26        Use the merge resolution program specified by <tool>.
  27        Valid merge tools are:
  28        kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
  29+
  30If a merge resolution program is not specified, `git mergetool`
  31will use the configuration variable `merge.tool`.  If the
  32configuration variable `merge.tool` is not set, `git mergetool`
  33will pick a suitable default.
  34+
  35You can explicitly provide a full path to the tool by setting the
  36configuration variable `mergetool.<tool>.path`. For example, you
  37can configure the absolute path to kdiff3 by setting
  38`mergetool.kdiff3.path`. Otherwise, `git mergetool` assumes the
  39tool is available in PATH.
  40+
  41Instead of running one of the known merge tool programs
  42`git mergetool` can be customized to run an alternative program
  43by specifying the command line to invoke in a configration
  44variable `mergetool.<tool>.cmd`.
  45+
  46When `git mergetool` is invoked with this tool (either through the
  47`-t` or `--tool` option or the `merge.tool` configuration
  48variable) the configured command line will be invoked with `$BASE`
  49set to the name of a temporary file containing the common base for
  50the merge, if available; `$LOCAL` set to the name of a temporary
  51file containing the contents of the file on the current branch;
  52`$REMOTE` set to the name of a temporary file containing the
  53contents of the file to be merged, and `$MERGED` set to the name
  54of the file to which the merge tool should write the result of the
  55merge resolution.
  56+
  57If the custom merge tool correctly indicates the success of a
  58merge resolution with its exit code then the configuration
  59variable `mergetool.<tool>.trustExitCode` can be set to `true`.
  60Otherwise, `git mergetool` will prompt the user to indicate the
  61success of the resolution after the custom tool has exited.
  62
  63Author
  64------
  65Written by Theodore Y Ts'o <tytso@mit.edu>
  66
  67Documentation
  68--------------
  69Documentation by Theodore Y Ts'o.
  70
  71GIT
  72---
  73Part of the linkgit:git[1] suite