Documentation / git-mergetool.txton commit t6300: add more body-parsing tests (7140c22)
   1git-mergetool(1)
   2================
   3
   4NAME
   5----
   6git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
   7
   8SYNOPSIS
   9--------
  10[verse]
  11'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>...]
  12
  13DESCRIPTION
  14-----------
  15
  16Use `git mergetool` to run one of several merge utilities to resolve
  17merge conflicts.  It is typically run after 'git merge'.
  18
  19If one or more <file> parameters are given, the merge tool program will
  20be run to resolve differences on each file.  If no <file> names are
  21specified, 'git mergetool' will run the merge tool program on every file
  22with merge conflicts.
  23
  24OPTIONS
  25-------
  26-t <tool>::
  27--tool=<tool>::
  28        Use the merge resolution program specified by <tool>.
  29        Valid merge tools are:
  30        araxis, bc3, diffuse, ecmerge, emerge, gvimdiff, kdiff3,
  31        meld, opendiff, p4merge, tkdiff, tortoisemerge, vimdiff and xxdiff.
  32+
  33If a merge resolution program is not specified, 'git mergetool'
  34will use the configuration variable `merge.tool`.  If the
  35configuration variable `merge.tool` is not set, 'git mergetool'
  36will pick a suitable default.
  37+
  38You can explicitly provide a full path to the tool by setting the
  39configuration variable `mergetool.<tool>.path`. For example, you
  40can configure the absolute path to kdiff3 by setting
  41`mergetool.kdiff3.path`. Otherwise, 'git mergetool' assumes the
  42tool is available in PATH.
  43+
  44Instead of running one of the known merge tool programs,
  45'git mergetool' can be customized to run an alternative program
  46by specifying the command line to invoke in a configuration
  47variable `mergetool.<tool>.cmd`.
  48+
  49When 'git mergetool' is invoked with this tool (either through the
  50`-t` or `--tool` option or the `merge.tool` configuration
  51variable) the configured command line will be invoked with `$BASE`
  52set to the name of a temporary file containing the common base for
  53the merge, if available; `$LOCAL` set to the name of a temporary
  54file containing the contents of the file on the current branch;
  55`$REMOTE` set to the name of a temporary file containing the
  56contents of the file to be merged, and `$MERGED` set to the name
  57of the file to which the merge tool should write the result of the
  58merge resolution.
  59+
  60If the custom merge tool correctly indicates the success of a
  61merge resolution with its exit code, then the configuration
  62variable `mergetool.<tool>.trustExitCode` can be set to `true`.
  63Otherwise, 'git mergetool' will prompt the user to indicate the
  64success of the resolution after the custom tool has exited.
  65
  66-y::
  67--no-prompt::
  68        Don't prompt before each invocation of the merge resolution
  69        program.
  70
  71--prompt::
  72        Prompt before each invocation of the merge resolution program.
  73        This is the default behaviour; the option is provided to
  74        override any configuration settings.
  75
  76TEMPORARY FILES
  77---------------
  78`git mergetool` creates `*.orig` backup files while resolving merges.
  79These are safe to remove once a file has been merged and its
  80`git mergetool` session has completed.
  81
  82Setting the `mergetool.keepBackup` configuration variable to `false`
  83causes `git mergetool` to automatically remove the backup as files
  84are successfully merged.
  85
  86GIT
  87---
  88Part of the linkgit:git[1] suite