]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-mergetool.txt
Sync with 1.6.4.2
[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:
b98c212a 29 kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge,
b6f0621a 30 diffuse, tortoisemerge, opendiff and araxis.
e15b484f 31+
ba020ef5 32If a merge resolution program is not specified, 'git-mergetool'
bbdfbc4b 33will use the configuration variable `merge.tool`. If the
ba020ef5 34configuration variable `merge.tool` is not set, 'git-mergetool'
e15b484f 35will pick a suitable default.
e3fa2c76
SP
36+
37You can explicitly provide a full path to the tool by setting the
bbdfbc4b 38configuration variable `mergetool.<tool>.path`. For example, you
e3fa2c76 39can configure the absolute path to kdiff3 by setting
ba020ef5 40`mergetool.kdiff3.path`. Otherwise, 'git-mergetool' assumes the
bbdfbc4b 41tool is available in PATH.
caa99829 42+
29b802aa 43Instead of running one of the known merge tool programs,
ba020ef5 44'git-mergetool' can be customized to run an alternative program
1168d402 45by specifying the command line to invoke in a configuration
caa99829
CB
46variable `mergetool.<tool>.cmd`.
47+
ba020ef5 48When 'git-mergetool' is invoked with this tool (either through the
caa99829
CB
49`-t` or `--tool` option or the `merge.tool` configuration
50variable) the configured command line will be invoked with `$BASE`
51set to the name of a temporary file containing the common base for
52the merge, if available; `$LOCAL` set to the name of a temporary
53file containing the contents of the file on the current branch;
54`$REMOTE` set to the name of a temporary file containing the
55contents of the file to be merged, and `$MERGED` set to the name
56of the file to which the merge tool should write the result of the
57merge resolution.
58+
59If the custom merge tool correctly indicates the success of a
29b802aa 60merge resolution with its exit code, then the configuration
caa99829 61variable `mergetool.<tool>.trustExitCode` can be set to `true`.
ba020ef5 62Otherwise, 'git-mergetool' will prompt the user to indicate the
caa99829 63success of the resolution after the custom tool has exited.
c4b4a5af 64
6b89d068
MH
65-y::
66--no-prompt::
682b451f
CB
67 Don't prompt before each invocation of the merge resolution
68 program.
69
70--prompt::
71 Prompt before each invocation of the merge resolution program.
72 This is the default behaviour; the option is provided to
73 override any configuration settings.
74
c4b4a5af
TT
75Author
76------
77Written by Theodore Y Ts'o <tytso@mit.edu>
78
79Documentation
80--------------
81Documentation by Theodore Y Ts'o.
82
83GIT
84---
9e1f0a85 85Part of the linkgit:git[1] suite