1GIT-MERGETOOL(1)                  Git Manual                  GIT-MERGETOOL(1)
2
3
4

NAME

6       git-mergetool - Run merge conflict resolution tools to resolve merge
7       conflicts
8

SYNOPSIS

10       git mergetool [--tool=<tool>] [-y | --[no-]prompt] [<file>...]
11
12

DESCRIPTION

14       Use git mergetool to run one of several merge utilities to resolve
15       merge conflicts. It is typically run after git merge.
16
17       If one or more <file> parameters are given, the merge tool program will
18       be run to resolve differences on each file (skipping those without
19       conflicts). Specifying a directory will include all unresolved files in
20       that path. If no <file> names are specified, git mergetool will run the
21       merge tool program on every file with merge conflicts.
22

OPTIONS

24       -t <tool>, --tool=<tool>
25           Use the merge resolution program specified by <tool>. Valid values
26           include emerge, gvimdiff, kdiff3, meld, vimdiff, and tortoisemerge.
27           Run git mergetool --tool-help for the list of valid <tool>
28           settings.
29
30           If a merge resolution program is not specified, git mergetool will
31           use the configuration variable merge.tool. If the configuration
32           variable merge.tool is not set, git mergetool will pick a suitable
33           default.
34
35           You can explicitly provide a full path to the tool by setting the
36           configuration variable mergetool.<tool>.path. For example, you can
37           configure the absolute path to kdiff3 by setting
38           mergetool.kdiff3.path. Otherwise, git mergetool assumes the tool is
39           available in PATH.
40
41           Instead of running one of the known merge tool programs, git
42           mergetool can be customized to run an alternative program by
43           specifying the command line to invoke in a configuration variable
44           mergetool.<tool>.cmd.
45
46           When git mergetool is invoked with this tool (either through the -t
47           or --tool option or the merge.tool configuration variable) the
48           configured command line will be invoked with $BASE set to the name
49           of a temporary file containing the common base for the merge, if
50           available; $LOCAL set to the name of a temporary file containing
51           the contents of the file on the current branch; $REMOTE set to the
52           name of a temporary file containing the contents of the file to be
53           merged, and $MERGED set to the name of the file to which the merge
54           tool should write the result of the merge resolution.
55
56           If the custom merge tool correctly indicates the success of a merge
57           resolution with its exit code, then the configuration variable
58           mergetool.<tool>.trustExitCode can be set to true. Otherwise, git
59           mergetool will prompt the user to indicate the success of the
60           resolution after the custom tool has exited.
61
62       --tool-help
63           Print a list of merge tools that may be used with --tool.
64
65       -y, --no-prompt
66           Don’t prompt before each invocation of the merge resolution
67           program. This is the default if the merge resolution program is
68           explicitly specified with the --tool option or with the merge.tool
69           configuration variable.
70
71       --prompt
72           Prompt before each invocation of the merge resolution program to
73           give the user a chance to skip the path.
74
75       -g, --gui
76           When git-mergetool is invoked with the -g or --gui option the
77           default merge tool will be read from the configured merge.guitool
78           variable instead of merge.tool.
79
80       --no-gui
81           This overrides a previous -g or --gui setting and reads the default
82           merge tool will be read from the configured merge.tool variable.
83
84       -O<orderfile>
85           Process files in the order specified in the <orderfile>, which has
86           one shell glob pattern per line. This overrides the diff.orderFile
87           configuration variable (see git-config(1)). To cancel
88           diff.orderFile, use -O/dev/null.
89

TEMPORARY FILES

91       git mergetool creates *.orig backup files while resolving merges. These
92       are safe to remove once a file has been merged and its git mergetool
93       session has completed.
94
95       Setting the mergetool.keepBackup configuration variable to false causes
96       git mergetool to automatically remove the backup as files are
97       successfully merged.
98

GIT

100       Part of the git(1) suite
101
102
103
104Git 2.21.0                        02/24/2019                  GIT-MERGETOOL(1)
Impressum