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