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

NAME

6       git-merge - Join two or more development histories together
7

SYNOPSIS

9       git merge [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
10               [--no-verify] [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]]
11               [--[no-]allow-unrelated-histories]
12               [--[no-]rerere-autoupdate] [-m <msg>] [-F <file>] [<commit>...]
13       git merge (--continue | --abort | --quit)
14

DESCRIPTION

16       Incorporates changes from the named commits (since the time their
17       histories diverged from the current branch) into the current branch.
18       This command is used by git pull to incorporate changes from another
19       repository and can be used by hand to merge changes from one branch
20       into another.
21
22       Assume the following history exists and the current branch is "master":
23
24                     A---B---C topic
25                    /
26               D---E---F---G master
27
28       Then "git merge topic" will replay the changes made on the topic branch
29       since it diverged from master (i.e., E) until its current commit (C) on
30       top of master, and record the result in a new commit along with the
31       names of the two parent commits and a log message from the user
32       describing the changes.
33
34                     A---B---C topic
35                    /         \
36               D---E---F---G---H master
37
38       The second syntax ("git merge --abort") can only be run after the merge
39       has resulted in conflicts. git merge --abort will abort the merge
40       process and try to reconstruct the pre-merge state. However, if there
41       were uncommitted changes when the merge started (and especially if
42       those changes were further modified after the merge was started), git
43       merge --abort will in some cases be unable to reconstruct the original
44       (pre-merge) changes. Therefore:
45
46       Warning: Running git merge with non-trivial uncommitted changes is
47       discouraged: while possible, it may leave you in a state that is hard
48       to back out of in the case of a conflict.
49
50       The third syntax ("git merge --continue") can only be run after the
51       merge has resulted in conflicts.
52

OPTIONS

54       --commit, --no-commit
55           Perform the merge and commit the result. This option can be used to
56           override --no-commit.
57
58           With --no-commit perform the merge and stop just before creating a
59           merge commit, to give the user a chance to inspect and further
60           tweak the merge result before committing.
61
62           Note that fast-forward updates do not create a merge commit and
63           therefore there is no way to stop those merges with --no-commit.
64           Thus, if you want to ensure your branch is not changed or updated
65           by the merge command, use --no-ff with --no-commit.
66
67       --edit, -e, --no-edit
68           Invoke an editor before committing successful mechanical merge to
69           further edit the auto-generated merge message, so that the user can
70           explain and justify the merge. The --no-edit option can be used to
71           accept the auto-generated message (this is generally discouraged).
72           The --edit (or -e) option is still useful if you are giving a draft
73           message with the -m option from the command line and want to edit
74           it in the editor.
75
76           Older scripts may depend on the historical behaviour of not
77           allowing the user to edit the merge log message. They will see an
78           editor opened when they run git merge. To make it easier to adjust
79           such scripts to the updated behaviour, the environment variable
80           GIT_MERGE_AUTOEDIT can be set to no at the beginning of them.
81
82       --cleanup=<mode>
83           This option determines how the merge message will be cleaned up
84           before committing. See git-commit(1) for more details. In addition,
85           if the <mode> is given a value of scissors, scissors will be
86           appended to MERGE_MSG before being passed on to the commit
87           machinery in the case of a merge conflict.
88
89       --ff, --no-ff, --ff-only
90           Specifies how a merge is handled when the merged-in history is
91           already a descendant of the current history.  --ff is the default
92           unless merging an annotated (and possibly signed) tag that is not
93           stored in its natural place in the refs/tags/ hierarchy, in which
94           case --no-ff is assumed.
95
96           With --ff, when possible resolve the merge as a fast-forward (only
97           update the branch pointer to match the merged branch; do not create
98           a merge commit). When not possible (when the merged-in history is
99           not a descendant of the current history), create a merge commit.
100
101           With --no-ff, create a merge commit in all cases, even when the
102           merge could instead be resolved as a fast-forward.
103
104           With --ff-only, resolve the merge as a fast-forward when possible.
105           When not possible, refuse to merge and exit with a non-zero status.
106
107       -S[<keyid>], --gpg-sign[=<keyid>], --no-gpg-sign
108           GPG-sign the resulting merge commit. The keyid argument is optional
109           and defaults to the committer identity; if specified, it must be
110           stuck to the option without a space.  --no-gpg-sign is useful to
111           countermand both commit.gpgSign configuration variable, and earlier
112           --gpg-sign.
113
114       --log[=<n>], --no-log
115           In addition to branch names, populate the log message with one-line
116           descriptions from at most <n> actual commits that are being merged.
117           See also git-fmt-merge-msg(1).
118
119           With --no-log do not list one-line descriptions from the actual
120           commits being merged.
121
122       --signoff, --no-signoff
123           Add a Signed-off-by trailer by the committer at the end of the
124           commit log message. The meaning of a signoff depends on the project
125           to which you’re committing. For example, it may certify that the
126           committer has the rights to submit the work under the project’s
127           license or agrees to some contributor representation, such as a
128           Developer Certificate of Origin. (See
129           http://developercertificate.org for the one used by the Linux
130           kernel and Git projects.) Consult the documentation or leadership
131           of the project to which you’re contributing to understand how the
132           signoffs are used in that project.
133
134           The --no-signoff option can be used to countermand an earlier
135           --signoff option on the command line.
136
137       --stat, -n, --no-stat
138           Show a diffstat at the end of the merge. The diffstat is also
139           controlled by the configuration option merge.stat.
140
141           With -n or --no-stat do not show a diffstat at the end of the
142           merge.
143
144       --squash, --no-squash
145           Produce the working tree and index state as if a real merge
146           happened (except for the merge information), but do not actually
147           make a commit, move the HEAD, or record $GIT_DIR/MERGE_HEAD (to
148           cause the next git commit command to create a merge commit). This
149           allows you to create a single commit on top of the current branch
150           whose effect is the same as merging another branch (or more in case
151           of an octopus).
152
153           With --no-squash perform the merge and commit the result. This
154           option can be used to override --squash.
155
156           With --squash, --commit is not allowed, and will fail.
157
158       --no-verify
159           This option bypasses the pre-merge and commit-msg hooks. See also
160           githooks(5).
161
162       -s <strategy>, --strategy=<strategy>
163           Use the given merge strategy; can be supplied more than once to
164           specify them in the order they should be tried. If there is no -s
165           option, a built-in list of strategies is used instead (git
166           merge-recursive when merging a single head, git merge-octopus
167           otherwise).
168
169       -X <option>, --strategy-option=<option>
170           Pass merge strategy specific option through to the merge strategy.
171
172       --verify-signatures, --no-verify-signatures
173           Verify that the tip commit of the side branch being merged is
174           signed with a valid key, i.e. a key that has a valid uid: in the
175           default trust model, this means the signing key has been signed by
176           a trusted key. If the tip commit of the side branch is not signed
177           with a valid key, the merge is aborted.
178
179       --summary, --no-summary
180           Synonyms to --stat and --no-stat; these are deprecated and will be
181           removed in the future.
182
183       -q, --quiet
184           Operate quietly. Implies --no-progress.
185
186       -v, --verbose
187           Be verbose.
188
189       --progress, --no-progress
190           Turn progress on/off explicitly. If neither is specified, progress
191           is shown if standard error is connected to a terminal. Note that
192           not all merge strategies may support progress reporting.
193
194       --autostash, --no-autostash
195           Automatically create a temporary stash entry before the operation
196           begins, and apply it after the operation ends. This means that you
197           can run the operation on a dirty worktree. However, use with care:
198           the final stash application after a successful merge might result
199           in non-trivial conflicts.
200
201       --allow-unrelated-histories
202           By default, git merge command refuses to merge histories that do
203           not share a common ancestor. This option can be used to override
204           this safety when merging histories of two projects that started
205           their lives independently. As that is a very rare occasion, no
206           configuration variable to enable this by default exists and will
207           not be added.
208
209       -m <msg>
210           Set the commit message to be used for the merge commit (in case one
211           is created).
212
213           If --log is specified, a shortlog of the commits being merged will
214           be appended to the specified message.
215
216           The git fmt-merge-msg command can be used to give a good default
217           for automated git merge invocations. The automated message can
218           include the branch description.
219
220       -F <file>, --file=<file>
221           Read the commit message to be used for the merge commit (in case
222           one is created).
223
224           If --log is specified, a shortlog of the commits being merged will
225           be appended to the specified message.
226
227       --rerere-autoupdate, --no-rerere-autoupdate
228           Allow the rerere mechanism to update the index with the result of
229           auto-conflict resolution if possible.
230
231       --overwrite-ignore, --no-overwrite-ignore
232           Silently overwrite ignored files from the merge result. This is the
233           default behavior. Use --no-overwrite-ignore to abort.
234
235       --abort
236           Abort the current conflict resolution process, and try to
237           reconstruct the pre-merge state. If an autostash entry is present,
238           apply it to the worktree.
239
240           If there were uncommitted worktree changes present when the merge
241           started, git merge --abort will in some cases be unable to
242           reconstruct these changes. It is therefore recommended to always
243           commit or stash your changes before running git merge.
244
245           git merge --abort is equivalent to git reset --merge when
246           MERGE_HEAD is present unless MERGE_AUTOSTASH is also present in
247           which case git merge --abort applies the stash entry to the
248           worktree whereas git reset --merge will save the stashed changes in
249           the stash list.
250
251       --quit
252           Forget about the current merge in progress. Leave the index and the
253           working tree as-is. If MERGE_AUTOSTASH is present, the stash entry
254           will be saved to the stash list.
255
256       --continue
257           After a git merge stops due to conflicts you can conclude the merge
258           by running git merge --continue (see "HOW TO RESOLVE CONFLICTS"
259           section below).
260
261       <commit>...
262           Commits, usually other branch heads, to merge into our branch.
263           Specifying more than one commit will create a merge with more than
264           two parents (affectionately called an Octopus merge).
265
266           If no commit is given from the command line, merge the
267           remote-tracking branches that the current branch is configured to
268           use as its upstream. See also the configuration section of this
269           manual page.
270
271           When FETCH_HEAD (and no other commit) is specified, the branches
272           recorded in the .git/FETCH_HEAD file by the previous invocation of
273           git fetch for merging are merged to the current branch.
274

PRE-MERGE CHECKS

276       Before applying outside changes, you should get your own work in good
277       shape and committed locally, so it will not be clobbered if there are
278       conflicts. See also git-stash(1). git pull and git merge will stop
279       without doing anything when local uncommitted changes overlap with
280       files that git pull/git merge may need to update.
281
282       To avoid recording unrelated changes in the merge commit, git pull and
283       git merge will also abort if there are any changes registered in the
284       index relative to the HEAD commit. (Special narrow exceptions to this
285       rule may exist depending on which merge strategy is in use, but
286       generally, the index must match HEAD.)
287
288       If all named commits are already ancestors of HEAD, git merge will exit
289       early with the message "Already up to date."
290

FAST-FORWARD MERGE

292       Often the current branch head is an ancestor of the named commit. This
293       is the most common case especially when invoked from git pull: you are
294       tracking an upstream repository, you have committed no local changes,
295       and now you want to update to a newer upstream revision. In this case,
296       a new commit is not needed to store the combined history; instead, the
297       HEAD (along with the index) is updated to point at the named commit,
298       without creating an extra merge commit.
299
300       This behavior can be suppressed with the --no-ff option.
301

TRUE MERGE

303       Except in a fast-forward merge (see above), the branches to be merged
304       must be tied together by a merge commit that has both of them as its
305       parents.
306
307       A merged version reconciling the changes from all branches to be merged
308       is committed, and your HEAD, index, and working tree are updated to it.
309       It is possible to have modifications in the working tree as long as
310       they do not overlap; the update will preserve them.
311
312       When it is not obvious how to reconcile the changes, the following
313       happens:
314
315        1. The HEAD pointer stays the same.
316
317        2. The MERGE_HEAD ref is set to point to the other branch head.
318
319        3. Paths that merged cleanly are updated both in the index file and in
320           your working tree.
321
322        4. For conflicting paths, the index file records up to three versions:
323           stage 1 stores the version from the common ancestor, stage 2 from
324           HEAD, and stage 3 from MERGE_HEAD (you can inspect the stages with
325           git ls-files -u). The working tree files contain the result of the
326           "merge" program; i.e. 3-way merge results with familiar conflict
327           markers <<< === >>>.
328
329        5. No other changes are made. In particular, the local modifications
330           you had before you started merge will stay the same and the index
331           entries for them stay as they were, i.e. matching HEAD.
332
333       If you tried a merge which resulted in complex conflicts and want to
334       start over, you can recover with git merge --abort.
335

MERGING TAG

337       When merging an annotated (and possibly signed) tag, Git always creates
338       a merge commit even if a fast-forward merge is possible, and the commit
339       message template is prepared with the tag message. Additionally, if the
340       tag is signed, the signature check is reported as a comment in the
341       message template. See also git-tag(1).
342
343       When you want to just integrate with the work leading to the commit
344       that happens to be tagged, e.g. synchronizing with an upstream release
345       point, you may not want to make an unnecessary merge commit.
346
347       In such a case, you can "unwrap" the tag yourself before feeding it to
348       git merge, or pass --ff-only when you do not have any work on your own.
349       e.g.
350
351           git fetch origin
352           git merge v1.2.3^0
353           git merge --ff-only v1.2.3
354

HOW CONFLICTS ARE PRESENTED

356       During a merge, the working tree files are updated to reflect the
357       result of the merge. Among the changes made to the common ancestor’s
358       version, non-overlapping ones (that is, you changed an area of the file
359       while the other side left that area intact, or vice versa) are
360       incorporated in the final result verbatim. When both sides made changes
361       to the same area, however, Git cannot randomly pick one side over the
362       other, and asks you to resolve it by leaving what both sides did to
363       that area.
364
365       By default, Git uses the same style as the one used by the "merge"
366       program from the RCS suite to present such a conflicted hunk, like
367       this:
368
369           Here are lines that are either unchanged from the common
370           ancestor, or cleanly resolved because only one side changed.
371           <<<<<<< yours:sample.txt
372           Conflict resolution is hard;
373           let's go shopping.
374           =======
375           Git makes conflict resolution easy.
376           >>>>>>> theirs:sample.txt
377           And here is another line that is cleanly resolved or unmodified.
378
379       The area where a pair of conflicting changes happened is marked with
380       markers <<<<<<<, =======, and >>>>>>>. The part before the ======= is
381       typically your side, and the part afterwards is typically their side.
382
383       The default format does not show what the original said in the
384       conflicting area. You cannot tell how many lines are deleted and
385       replaced with Barbie’s remark on your side. The only thing you can tell
386       is that your side wants to say it is hard and you’d prefer to go
387       shopping, while the other side wants to claim it is easy.
388
389       An alternative style can be used by setting the "merge.conflictStyle"
390       configuration variable to "diff3". In "diff3" style, the above conflict
391       may look like this:
392
393           Here are lines that are either unchanged from the common
394           ancestor, or cleanly resolved because only one side changed.
395           <<<<<<< yours:sample.txt
396           Conflict resolution is hard;
397           let's go shopping.
398           |||||||
399           Conflict resolution is hard.
400           =======
401           Git makes conflict resolution easy.
402           >>>>>>> theirs:sample.txt
403           And here is another line that is cleanly resolved or unmodified.
404
405       In addition to the <<<<<<<, =======, and >>>>>>> markers, it uses
406       another ||||||| marker that is followed by the original text. You can
407       tell that the original just stated a fact, and your side simply gave in
408       to that statement and gave up, while the other side tried to have a
409       more positive attitude. You can sometimes come up with a better
410       resolution by viewing the original.
411

HOW TO RESOLVE CONFLICTS

413       After seeing a conflict, you can do two things:
414
415       •   Decide not to merge. The only clean-ups you need are to reset the
416           index file to the HEAD commit to reverse 2. and to clean up working
417           tree changes made by 2. and 3.; git merge --abort can be used for
418           this.
419
420       •   Resolve the conflicts. Git will mark the conflicts in the working
421           tree. Edit the files into shape and git add them to the index. Use
422           git commit or git merge --continue to seal the deal. The latter
423           command checks whether there is a (interrupted) merge in progress
424           before calling git commit.
425
426       You can work through the conflict with a number of tools:
427
428       •   Use a mergetool.  git mergetool to launch a graphical mergetool
429           which will work you through the merge.
430
431       •   Look at the diffs.  git diff will show a three-way diff,
432           highlighting changes from both the HEAD and MERGE_HEAD versions.
433
434       •   Look at the diffs from each branch.  git log --merge -p <path> will
435           show diffs first for the HEAD version and then the MERGE_HEAD
436           version.
437
438       •   Look at the originals.  git show :1:filename shows the common
439           ancestor, git show :2:filename shows the HEAD version, and git show
440           :3:filename shows the MERGE_HEAD version.
441

EXAMPLES

443       •   Merge branches fixes and enhancements on top of the current branch,
444           making an octopus merge:
445
446               $ git merge fixes enhancements
447
448       •   Merge branch obsolete into the current branch, using ours merge
449           strategy:
450
451               $ git merge -s ours obsolete
452
453       •   Merge branch maint into the current branch, but do not make a new
454           commit automatically:
455
456               $ git merge --no-commit maint
457
458           This can be used when you want to include further changes to the
459           merge, or want to write your own merge commit message.
460
461           You should refrain from abusing this option to sneak substantial
462           changes into a merge commit. Small fixups like bumping
463           release/version name would be acceptable.
464

MERGE STRATEGIES

466       The merge mechanism (git merge and git pull commands) allows the
467       backend merge strategies to be chosen with -s option. Some strategies
468       can also take their own options, which can be passed by giving
469       -X<option> arguments to git merge and/or git pull.
470
471       resolve
472           This can only resolve two heads (i.e. the current branch and
473           another branch you pulled from) using a 3-way merge algorithm. It
474           tries to carefully detect criss-cross merge ambiguities and is
475           considered generally safe and fast.
476
477       recursive
478           This can only resolve two heads using a 3-way merge algorithm. When
479           there is more than one common ancestor that can be used for 3-way
480           merge, it creates a merged tree of the common ancestors and uses
481           that as the reference tree for the 3-way merge. This has been
482           reported to result in fewer merge conflicts without causing
483           mismerges by tests done on actual merge commits taken from Linux
484           2.6 kernel development history. Additionally this can detect and
485           handle merges involving renames, but currently cannot make use of
486           detected copies. This is the default merge strategy when pulling or
487           merging one branch.
488
489           The recursive strategy can take the following options:
490
491           ours
492               This option forces conflicting hunks to be auto-resolved
493               cleanly by favoring our version. Changes from the other tree
494               that do not conflict with our side are reflected in the merge
495               result. For a binary file, the entire contents are taken from
496               our side.
497
498               This should not be confused with the ours merge strategy, which
499               does not even look at what the other tree contains at all. It
500               discards everything the other tree did, declaring our history
501               contains all that happened in it.
502
503           theirs
504               This is the opposite of ours; note that, unlike ours, there is
505               no theirs merge strategy to confuse this merge option with.
506
507           patience
508               With this option, merge-recursive spends a little extra time to
509               avoid mismerges that sometimes occur due to unimportant
510               matching lines (e.g., braces from distinct functions). Use this
511               when the branches to be merged have diverged wildly. See also
512               git-diff(1) --patience.
513
514           diff-algorithm=[patience|minimal|histogram|myers]
515               Tells merge-recursive to use a different diff algorithm, which
516               can help avoid mismerges that occur due to unimportant matching
517               lines (such as braces from distinct functions). See also git-
518               diff(1) --diff-algorithm.
519
520           ignore-space-change, ignore-all-space, ignore-space-at-eol,
521           ignore-cr-at-eol
522               Treats lines with the indicated type of whitespace change as
523               unchanged for the sake of a three-way merge. Whitespace changes
524               mixed with other changes to a line are not ignored. See also
525               git-diff(1) -b, -w, --ignore-space-at-eol, and
526               --ignore-cr-at-eol.
527
528               •   If their version only introduces whitespace changes to a
529                   line, our version is used;
530
531               •   If our version introduces whitespace changes but their
532                   version includes a substantial change, their version is
533                   used;
534
535               •   Otherwise, the merge proceeds in the usual way.
536
537           renormalize
538               This runs a virtual check-out and check-in of all three stages
539               of a file when resolving a three-way merge. This option is
540               meant to be used when merging branches with different clean
541               filters or end-of-line normalization rules. See "Merging
542               branches with differing checkin/checkout attributes" in
543               gitattributes(5) for details.
544
545           no-renormalize
546               Disables the renormalize option. This overrides the
547               merge.renormalize configuration variable.
548
549           no-renames
550               Turn off rename detection. This overrides the merge.renames
551               configuration variable. See also git-diff(1) --no-renames.
552
553           find-renames[=<n>]
554               Turn on rename detection, optionally setting the similarity
555               threshold. This is the default. This overrides the
556               merge.renames configuration variable. See also git-diff(1)
557               --find-renames.
558
559           rename-threshold=<n>
560               Deprecated synonym for find-renames=<n>.
561
562           subtree[=<path>]
563               This option is a more advanced form of subtree strategy, where
564               the strategy makes a guess on how two trees must be shifted to
565               match with each other when merging. Instead, the specified path
566               is prefixed (or stripped from the beginning) to make the shape
567               of two trees to match.
568
569       octopus
570           This resolves cases with more than two heads, but refuses to do a
571           complex merge that needs manual resolution. It is primarily meant
572           to be used for bundling topic branch heads together. This is the
573           default merge strategy when pulling or merging more than one
574           branch.
575
576       ours
577           This resolves any number of heads, but the resulting tree of the
578           merge is always that of the current branch head, effectively
579           ignoring all changes from all other branches. It is meant to be
580           used to supersede old development history of side branches. Note
581           that this is different from the -Xours option to the recursive
582           merge strategy.
583
584       subtree
585           This is a modified recursive strategy. When merging trees A and B,
586           if B corresponds to a subtree of A, B is first adjusted to match
587           the tree structure of A, instead of reading the trees at the same
588           level. This adjustment is also done to the common ancestor tree.
589
590       With the strategies that use 3-way merge (including the default,
591       recursive), if a change is made on both branches, but later reverted on
592       one of the branches, that change will be present in the merged result;
593       some people find this behavior confusing. It occurs because only the
594       heads and the merge base are considered when performing a merge, not
595       the individual commits. The merge algorithm therefore considers the
596       reverted change as no change at all, and substitutes the changed
597       version instead.
598

CONFIGURATION

600       merge.conflictStyle
601           Specify the style in which conflicted hunks are written out to
602           working tree files upon merge. The default is "merge", which shows
603           a <<<<<<< conflict marker, changes made by one side, a =======
604           marker, changes made by the other side, and then a >>>>>>> marker.
605           An alternate style, "diff3", adds a ||||||| marker and the original
606           text before the ======= marker.
607
608       merge.defaultToUpstream
609           If merge is called without any commit argument, merge the upstream
610           branches configured for the current branch by using their last
611           observed values stored in their remote-tracking branches. The
612           values of the branch.<current branch>.merge that name the branches
613           at the remote named by branch.<current branch>.remote are
614           consulted, and then they are mapped via remote.<remote>.fetch to
615           their corresponding remote-tracking branches, and the tips of these
616           tracking branches are merged.
617
618       merge.ff
619           By default, Git does not create an extra merge commit when merging
620           a commit that is a descendant of the current commit. Instead, the
621           tip of the current branch is fast-forwarded. When set to false,
622           this variable tells Git to create an extra merge commit in such a
623           case (equivalent to giving the --no-ff option from the command
624           line). When set to only, only such fast-forward merges are allowed
625           (equivalent to giving the --ff-only option from the command line).
626
627       merge.verifySignatures
628           If true, this is equivalent to the --verify-signatures command line
629           option. See git-merge(1) for details.
630
631       merge.branchdesc
632           In addition to branch names, populate the log message with the
633           branch description text associated with them. Defaults to false.
634
635       merge.log
636           In addition to branch names, populate the log message with at most
637           the specified number of one-line descriptions from the actual
638           commits that are being merged. Defaults to false, and true is a
639           synonym for 20.
640
641       merge.suppressDest
642           By adding a glob that matches the names of integration branches to
643           this multi-valued configuration variable, the default merge message
644           computed for merges into these integration branches will omit "into
645           <branch name>" from its title.
646
647           An element with an empty value can be used to clear the list of
648           globs accumulated from previous configuration entries. When there
649           is no merge.suppressDest variable defined, the default value of
650           master is used for backward compatibility.
651
652       merge.renameLimit
653           The number of files to consider when performing rename detection
654           during a merge; if not specified, defaults to the value of
655           diff.renameLimit. This setting has no effect if rename detection is
656           turned off.
657
658       merge.renames
659           Whether Git detects renames. If set to "false", rename detection is
660           disabled. If set to "true", basic rename detection is enabled.
661           Defaults to the value of diff.renames.
662
663       merge.directoryRenames
664           Whether Git detects directory renames, affecting what happens at
665           merge time to new files added to a directory on one side of history
666           when that directory was renamed on the other side of history. If
667           merge.directoryRenames is set to "false", directory rename
668           detection is disabled, meaning that such new files will be left
669           behind in the old directory. If set to "true", directory rename
670           detection is enabled, meaning that such new files will be moved
671           into the new directory. If set to "conflict", a conflict will be
672           reported for such paths. If merge.renames is false,
673           merge.directoryRenames is ignored and treated as false. Defaults to
674           "conflict".
675
676       merge.renormalize
677           Tell Git that canonical representation of files in the repository
678           has changed over time (e.g. earlier commits record text files with
679           CRLF line endings, but recent ones use LF line endings). In such a
680           repository, Git can convert the data recorded in commits to a
681           canonical form before performing a merge to reduce unnecessary
682           conflicts. For more information, see section "Merging branches with
683           differing checkin/checkout attributes" in gitattributes(5).
684
685       merge.stat
686           Whether to print the diffstat between ORIG_HEAD and the merge
687           result at the end of the merge. True by default.
688
689       merge.autoStash
690           When set to true, automatically create a temporary stash entry
691           before the operation begins, and apply it after the operation ends.
692           This means that you can run merge on a dirty worktree. However, use
693           with care: the final stash application after a successful merge
694           might result in non-trivial conflicts. This option can be
695           overridden by the --no-autostash and --autostash options of git-
696           merge(1). Defaults to false.
697
698       merge.tool
699           Controls which merge tool is used by git-mergetool(1). The list
700           below shows the valid built-in values. Any other value is treated
701           as a custom merge tool and requires that a corresponding
702           mergetool.<tool>.cmd variable is defined.
703
704       merge.guitool
705           Controls which merge tool is used by git-mergetool(1) when the
706           -g/--gui flag is specified. The list below shows the valid built-in
707           values. Any other value is treated as a custom merge tool and
708           requires that a corresponding mergetool.<guitool>.cmd variable is
709           defined.
710
711           •   araxis
712
713           •   bc
714
715           •   bc3
716
717           •   bc4
718
719           •   codecompare
720
721           •   deltawalker
722
723           •   diffmerge
724
725           •   diffuse
726
727           •   ecmerge
728
729           •   emerge
730
731           •   examdiff
732
733           •   guiffy
734
735           •   gvimdiff
736
737           •   gvimdiff1
738
739           •   gvimdiff2
740
741           •   gvimdiff3
742
743           •   kdiff3
744
745           •   meld
746
747           •   nvimdiff
748
749           •   nvimdiff1
750
751           •   nvimdiff2
752
753           •   nvimdiff3
754
755           •   opendiff
756
757           •   p4merge
758
759           •   smerge
760
761           •   tkdiff
762
763           •   tortoisemerge
764
765           •   vimdiff
766
767           •   vimdiff1
768
769           •   vimdiff2
770
771           •   vimdiff3
772
773           •   winmerge
774
775           •   xxdiff
776
777       merge.verbosity
778           Controls the amount of output shown by the recursive merge
779           strategy. Level 0 outputs nothing except a final error message if
780           conflicts were detected. Level 1 outputs only conflicts, 2 outputs
781           conflicts and file changes. Level 5 and above outputs debugging
782           information. The default is level 2. Can be overridden by the
783           GIT_MERGE_VERBOSITY environment variable.
784
785       merge.<driver>.name
786           Defines a human-readable name for a custom low-level merge driver.
787           See gitattributes(5) for details.
788
789       merge.<driver>.driver
790           Defines the command that implements a custom low-level merge
791           driver. See gitattributes(5) for details.
792
793       merge.<driver>.recursive
794           Names a low-level merge driver to be used when performing an
795           internal merge between common ancestors. See gitattributes(5) for
796           details.
797
798       branch.<name>.mergeOptions
799           Sets default options for merging into branch <name>. The syntax and
800           supported options are the same as those of git merge, but option
801           values containing whitespace characters are currently not
802           supported.
803

SEE ALSO

805       git-fmt-merge-msg(1), git-pull(1), gitattributes(5), git-reset(1), git-
806       diff(1), git-ls-files(1), git-add(1), git-rm(1), git-mergetool(1)
807

GIT

809       Part of the git(1) suite
810
811
812
813Git 2.31.1                        2021-03-26                      GIT-MERGE(1)
Impressum