Documentation / git-mergetool.txton commit Merge branch 'jc/branch-previous' (472e474)
   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>] [-y|--no-prompt|--prompt] [<file>]...
  11
  12DESCRIPTION
  13-----------
  14
  15Use `git mergetool` to run one of several merge utilities to resolve
  16merge conflicts.  It is typically run after 'git-merge'.
  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 <tool>::
  26--tool=<tool>::
  27        Use the merge resolution program specified by <tool>.
  28        Valid merge tools are:
  29        kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
  30+
  31If a merge resolution program is not specified, 'git-mergetool'
  32will use the configuration variable `merge.tool`.  If the
  33configuration variable `merge.tool` is not set, 'git-mergetool'
  34will pick a suitable default.
  35+
  36You can explicitly provide a full path to the tool by setting the
  37configuration variable `mergetool.<tool>.path`. For example, you
  38can configure the absolute path to kdiff3 by setting
  39`mergetool.kdiff3.path`. Otherwise, 'git-mergetool' assumes the
  40tool is available in PATH.
  41+
  42Instead of running one of the known merge tool programs,
  43'git-mergetool' can be customized to run an alternative program
  44by specifying the command line to invoke in a configuration
  45variable `mergetool.<tool>.cmd`.
  46+
  47When 'git-mergetool' is invoked with this tool (either through the
  48`-t` or `--tool` option or the `merge.tool` configuration
  49variable) the configured command line will be invoked with `$BASE`
  50set to the name of a temporary file containing the common base for
  51the merge, if available; `$LOCAL` set to the name of a temporary
  52file containing the contents of the file on the current branch;
  53`$REMOTE` set to the name of a temporary file containing the
  54contents of the file to be merged, and `$MERGED` set to the name
  55of the file to which the merge tool should write the result of the
  56merge resolution.
  57+
  58If the custom merge tool correctly indicates the success of a
  59merge resolution with its exit code, then the configuration
  60variable `mergetool.<tool>.trustExitCode` can be set to `true`.
  61Otherwise, 'git-mergetool' will prompt the user to indicate the
  62success of the resolution after the custom tool has exited.
  63
  64-y::
  65--no-prompt::
  66        Don't prompt before each invocation of the merge resolution
  67        program.
  68
  69--prompt::
  70        Prompt before each invocation of the merge resolution program.
  71        This is the default behaviour; the option is provided to
  72        override any configuration settings.
  73
  74Author
  75------
  76Written by Theodore Y Ts'o <tytso@mit.edu>
  77
  78Documentation
  79--------------
  80Documentation by Theodore Y Ts'o.
  81
  82GIT
  83---
  84Part of the linkgit:git[1] suite