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

DESCRIPTION

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

OPTIONS

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