]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-mergetool.txt
Increase the size of the die/warning buffer to avoid truncation
[thirdparty/git.git] / Documentation / git-mergetool.txt
CommitLineData
c4b4a5af
TT
1git-mergetool(1)
2================
3
4NAME
5----
6git-mergetool - Run merge conflict resolution tools to resolve merge conflicts
7
8SYNOPSIS
9--------
682b451f 10'git mergetool' [--tool=<tool>] [-y|--no-prompt|--prompt] [<file>]...
c4b4a5af
TT
11
12DESCRIPTION
13-----------
14
bbdfbc4b 15Use `git mergetool` to run one of several merge utilities to resolve
ba020ef5 16merge conflicts. It is typically run after 'git-merge'.
c4b4a5af
TT
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
ba020ef5 20specified, 'git-mergetool' will run the merge tool program on every file
c4b4a5af
TT
21with merge conflicts.
22
23OPTIONS
24-------
6b89d068
MH
25-t <tool>::
26--tool=<tool>::
c4b4a5af
TT
27 Use the merge resolution program specified by <tool>.
28 Valid merge tools are:
ca8e6b7a 29 kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge, and opendiff
e15b484f 30+
ba020ef5 31If a merge resolution program is not specified, 'git-mergetool'
bbdfbc4b 32will use the configuration variable `merge.tool`. If the
ba020ef5 33configuration variable `merge.tool` is not set, 'git-mergetool'
e15b484f 34will pick a suitable default.
e3fa2c76
SP
35+
36You can explicitly provide a full path to the tool by setting the
bbdfbc4b 37configuration variable `mergetool.<tool>.path`. For example, you
e3fa2c76 38can configure the absolute path to kdiff3 by setting
ba020ef5 39`mergetool.kdiff3.path`. Otherwise, 'git-mergetool' assumes the
bbdfbc4b 40tool is available in PATH.
caa99829 41+
29b802aa 42Instead of running one of the known merge tool programs,
ba020ef5 43'git-mergetool' can be customized to run an alternative program
1168d402 44by specifying the command line to invoke in a configuration
caa99829
CB
45variable `mergetool.<tool>.cmd`.
46+
ba020ef5 47When 'git-mergetool' is invoked with this tool (either through the
caa99829
CB
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
29b802aa 59merge resolution with its exit code, then the configuration
caa99829 60variable `mergetool.<tool>.trustExitCode` can be set to `true`.
ba020ef5 61Otherwise, 'git-mergetool' will prompt the user to indicate the
caa99829 62success of the resolution after the custom tool has exited.
c4b4a5af 63
6b89d068
MH
64-y::
65--no-prompt::
682b451f
CB
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
c4b4a5af
TT
74Author
75------
76Written by Theodore Y Ts'o <tytso@mit.edu>
77
78Documentation
79--------------
80Documentation by Theodore Y Ts'o.
81
82GIT
83---
9e1f0a85 84Part of the linkgit:git[1] suite