1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
\r
4 <article lang="en" id="git-merge(1)">
\r
6 <title>git-merge(1)</title>
\r
8 <primary>git-merge(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-merge - Join two or more development histories together</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
18 <literallayout><emphasis>git merge</emphasis> [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
\r
19 [-s <strategy>] [-X <strategy-option>]
\r
20 [--[no-]rerere-autoupdate] [-m <msg>] [<commit>…]
\r
21 <emphasis>git merge</emphasis> <msg> HEAD <commit>…
\r
22 <emphasis>git merge</emphasis> --abort</literallayout>
\r
25 <simplesect id="_description">
\r
26 <title>DESCRIPTION</title>
\r
27 <simpara>Incorporates changes from the named commits (since the time their
\r
28 histories diverged from the current branch) into the current
\r
29 branch. This command is used by <emphasis>git pull</emphasis> to incorporate changes
\r
30 from another repository and can be used by hand to merge changes
\r
31 from one branch into another.</simpara>
\r
32 <simpara>Assume the following history exists and the current branch is
\r
33 "<emphasis>master</emphasis>":</simpara>
\r
34 <screen> A---B---C topic
\r
36 D---E---F---G master</screen>
\r
37 <simpara>Then "<emphasis>git merge topic</emphasis>" will replay the changes made on the
\r
38 <emphasis>topic</emphasis> branch since it diverged from <emphasis>master</emphasis> (i.e., <emphasis>E</emphasis>) until
\r
39 its current commit (<emphasis>C</emphasis>) on top of <emphasis>master</emphasis>, and record the result
\r
40 in a new commit along with the names of the two parent commits and
\r
41 a log message from the user describing the changes.</simpara>
\r
42 <screen> A---B---C topic
\r
44 D---E---F---G---H master</screen>
\r
45 <simpara>The second syntax (<msg> <emphasis>HEAD</emphasis> <commit>…) is supported for
\r
46 historical reasons. Do not use it from the command line or in
\r
47 new scripts. It is the same as <emphasis>git merge -m <msg> <commit>...</emphasis>.</simpara>
\r
48 <simpara>The third syntax ("<emphasis>git merge --abort</emphasis>") can only be run after the
\r
49 merge has resulted in conflicts. <emphasis>git merge --abort</emphasis> will abort the
\r
50 merge process and try to reconstruct the pre-merge state. However,
\r
51 if there were uncommitted changes when the merge started (and
\r
52 especially if those changes were further modified after the merge
\r
53 was started), <emphasis>git merge --abort</emphasis> will in some cases be unable to
\r
54 reconstruct the original (pre-merge) changes. Therefore:</simpara>
\r
55 <simpara><emphasis role="strong">Warning</emphasis>: Running <emphasis>git merge</emphasis> with uncommitted changes is
\r
56 discouraged: while possible, it leaves you in a state that is hard to
\r
57 back out of in the case of a conflict.</simpara>
\r
59 <simplesect id="_options">
\r
60 <title>OPTIONS</title>
\r
71 Perform the merge and commit the result. This option can
\r
72 be used to override --no-commit.
\r
74 <simpara>With --no-commit perform the merge but pretend the merge
\r
75 failed and do not autocommit, to give the user a chance to
\r
76 inspect and further tweak the merge result before committing.</simpara>
\r
88 Invoke an editor before committing successful mechanical merge to
\r
89 further edit the auto-generated merge message, so that the user
\r
90 can explain and justify the merge. The <emphasis>--no-edit</emphasis> option can be
\r
91 used to accept the auto-generated message (this is generally
\r
92 discouraged). The <emphasis>--edit</emphasis> option is still useful if you are
\r
93 giving a draft message with the <emphasis>-m</emphasis> option from the command line
\r
94 and want to edit it in the editor.
\r
96 <simpara>Older scripts may depend on the historical behaviour of not allowing the
\r
97 user to edit the merge log message. They will see an editor opened when
\r
98 they run <emphasis>git merge</emphasis>. To make it easier to adjust such scripts to the
\r
99 updated behaviour, the environment variable <emphasis>GIT_MERGE_AUTOEDIT</emphasis> can be
\r
100 set to <emphasis>no</emphasis> at the beginning of them.</simpara>
\r
109 When the merge resolves as a fast-forward, only update the branch
\r
110 pointer, without creating a merge commit. This is the default
\r
121 Create a merge commit even when the merge resolves as a
\r
132 Refuse to merge and exit with a non-zero status unless the
\r
133 current <emphasis>HEAD</emphasis> is already up-to-date or the merge can be
\r
134 resolved as a fast-forward.
\r
147 In addition to branch names, populate the log message with
\r
148 one-line descriptions from at most <n> actual commits that are being
\r
149 merged. See also <xref linkend="git-fmt-merge-msg(1)" />.
\r
151 <simpara>With --no-log do not list one-line descriptions from the
\r
152 actual commits being merged.</simpara>
\r
167 Show a diffstat at the end of the merge. The diffstat is also
\r
168 controlled by the configuration option merge.stat.
\r
170 <simpara>With -n or --no-stat do not show a diffstat at the end of the
\r
183 Produce the working tree and index state as if a real
\r
184 merge happened (except for the merge information),
\r
185 but do not actually make a commit or
\r
186 move the <emphasis>HEAD</emphasis>, nor record <emphasis>$GIT_DIR/MERGE_HEAD</emphasis> to
\r
187 cause the next <emphasis>git commit</emphasis> command to create a merge
\r
188 commit. This allows you to create a single commit on
\r
189 top of the current branch whose effect is the same as
\r
190 merging another branch (or more in case of an octopus).
\r
192 <simpara>With --no-squash perform the merge and commit the result. This
\r
193 option can be used to override --squash.</simpara>
\r
198 -s <strategy>
\r
201 --strategy=<strategy>
\r
205 Use the given merge strategy; can be supplied more than
\r
206 once to specify them in the order they should be tried.
\r
207 If there is no <emphasis>-s</emphasis> option, a built-in list of strategies
\r
208 is used instead (<emphasis>git merge-recursive</emphasis> when merging a single
\r
209 head, <emphasis>git merge-octopus</emphasis> otherwise).
\r
218 --strategy-option=<option>
\r
222 Pass merge strategy specific option through to the merge
\r
236 Synonyms to --stat and --no-stat; these are deprecated and will be
\r
237 removed in the future.
\r
250 Operate quietly. Implies --no-progress.
\r
276 Turn progress on/off explicitly. If neither is specified,
\r
277 progress is shown if standard error is connected to a terminal.
\r
278 Note that not all merge strategies may support progress
\r
289 Set the commit message to be used for the merge commit (in
\r
290 case one is created).
\r
292 <simpara>If <emphasis>--log</emphasis> is specified, a shortlog of the commits being merged
\r
293 will be appended to the specified message.</simpara>
\r
294 <simpara>The <emphasis>git fmt-merge-msg</emphasis> command can be
\r
295 used to give a good default for automated <emphasis>git merge</emphasis>
\r
296 invocations.</simpara>
\r
301 --rerere-autoupdate
\r
304 --no-rerere-autoupdate
\r
308 Allow the rerere mechanism to update the index with the
\r
309 result of auto-conflict resolution if possible.
\r
319 Abort the current conflict resolution process, and
\r
320 try to reconstruct the pre-merge state.
\r
322 <simpara>If there were uncommitted worktree changes present when the merge
\r
323 started, <emphasis>git merge --abort</emphasis> will in some cases be unable to
\r
324 reconstruct these changes. It is therefore recommended to always
\r
325 commit or stash your changes before running <emphasis>git merge</emphasis>.</simpara>
\r
326 <simpara><emphasis>git merge --abort</emphasis> is equivalent to <emphasis>git reset --merge</emphasis> when
\r
327 <emphasis>MERGE_HEAD</emphasis> is present.</simpara>
\r
332 <commit>…
\r
336 Commits, usually other branch heads, to merge into our branch.
\r
337 Specifying more than one commit will create a merge with
\r
338 more than two parents (affectionately called an Octopus merge).
\r
340 <simpara>If no commit is given from the command line, and if <emphasis>merge.defaultToUpstream</emphasis>
\r
341 configuration variable is set, merge the remote tracking branches
\r
342 that the current branch is configured to use as its upstream.
\r
343 See also the configuration section of this manual page.</simpara>
\r
348 <simplesect id="_pre_merge_checks">
\r
349 <title>PRE-MERGE CHECKS</title>
\r
350 <simpara>Before applying outside changes, you should get your own work in
\r
351 good shape and committed locally, so it will not be clobbered if
\r
352 there are conflicts. See also <xref linkend="git-stash(1)" />.
\r
353 <emphasis>git pull</emphasis> and <emphasis>git merge</emphasis> will stop without doing anything when
\r
354 local uncommitted changes overlap with files that <emphasis>git pull</emphasis>/<emphasis>git
\r
355 merge</emphasis> may need to update.</simpara>
\r
356 <simpara>To avoid recording unrelated changes in the merge commit,
\r
357 <emphasis>git pull</emphasis> and <emphasis>git merge</emphasis> will also abort if there are any changes
\r
358 registered in the index relative to the <emphasis>HEAD</emphasis> commit. (One
\r
359 exception is when the changed index entries are in the state that
\r
360 would result from the merge already.)</simpara>
\r
361 <simpara>If all named commits are already ancestors of <emphasis>HEAD</emphasis>, <emphasis>git merge</emphasis>
\r
362 will exit early with the message "Already up-to-date."</simpara>
\r
364 <simplesect id="_fast_forward_merge">
\r
365 <title>FAST-FORWARD MERGE</title>
\r
366 <simpara>Often the current branch head is an ancestor of the named commit.
\r
367 This is the most common case especially when invoked from <emphasis>git
\r
368 pull</emphasis>: you are tracking an upstream repository, you have committed
\r
369 no local changes, and now you want to update to a newer upstream
\r
370 revision. In this case, a new commit is not needed to store the
\r
371 combined history; instead, the <emphasis>HEAD</emphasis> (along with the index) is
\r
372 updated to point at the named commit, without creating an extra
\r
373 merge commit.</simpara>
\r
374 <simpara>This behavior can be suppressed with the <emphasis>--no-ff</emphasis> option.</simpara>
\r
376 <simplesect id="_true_merge">
\r
377 <title>TRUE MERGE</title>
\r
378 <simpara>Except in a fast-forward merge (see above), the branches to be
\r
379 merged must be tied together by a merge commit that has both of them
\r
380 as its parents.</simpara>
\r
381 <simpara>A merged version reconciling the changes from all branches to be
\r
382 merged is committed, and your <emphasis>HEAD</emphasis>, index, and working tree are
\r
383 updated to it. It is possible to have modifications in the working
\r
384 tree as long as they do not overlap; the update will preserve them.</simpara>
\r
385 <simpara>When it is not obvious how to reconcile the changes, the following
\r
387 <orderedlist numeration="arabic">
\r
390 The <emphasis>HEAD</emphasis> pointer stays the same.
\r
395 The <emphasis>MERGE_HEAD</emphasis> ref is set to point to the other branch head.
\r
400 Paths that merged cleanly are updated both in the index file and
\r
401 in your working tree.
\r
406 For conflicting paths, the index file records up to three
\r
407 versions: stage 1 stores the version from the common ancestor,
\r
408 stage 2 from <emphasis>HEAD</emphasis>, and stage 3 from <emphasis>MERGE_HEAD</emphasis> (you
\r
409 can inspect the stages with <emphasis>git ls-files -u</emphasis>). The working
\r
410 tree files contain the result of the "merge" program; i.e. 3-way
\r
411 merge results with familiar conflict markers <emphasis><<<</emphasis> <emphasis>===</emphasis> <emphasis>>>></emphasis>.
\r
416 No other changes are made. In particular, the local
\r
417 modifications you had before you started merge will stay the
\r
418 same and the index entries for them stay as they were,
\r
419 i.e. matching <emphasis>HEAD</emphasis>.
\r
423 <simpara>If you tried a merge which resulted in complex conflicts and
\r
424 want to start over, you can recover with <emphasis>git merge --abort</emphasis>.</simpara>
\r
426 <simplesect id="_how_conflicts_are_presented">
\r
427 <title>HOW CONFLICTS ARE PRESENTED</title>
\r
428 <simpara>During a merge, the working tree files are updated to reflect the result
\r
429 of the merge. Among the changes made to the common ancestor's version,
\r
430 non-overlapping ones (that is, you changed an area of the file while the
\r
431 other side left that area intact, or vice versa) are incorporated in the
\r
432 final result verbatim. When both sides made changes to the same area,
\r
433 however, git cannot randomly pick one side over the other, and asks you to
\r
434 resolve it by leaving what both sides did to that area.</simpara>
\r
435 <simpara>By default, git uses the same style as that is used by "merge" program
\r
436 from the RCS suite to present such a conflicted hunk, like this:</simpara>
\r
437 <screen>Here are lines that are either unchanged from the common
\r
438 ancestor, or cleanly resolved because only one side changed.
\r
439 <<<<<<< yours:sample.txt
\r
440 Conflict resolution is hard;
\r
443 Git makes conflict resolution easy.
\r
444 >>>>>>> theirs:sample.txt
\r
445 And here is another line that is cleanly resolved or unmodified.</screen>
\r
446 <simpara>The area where a pair of conflicting changes happened is marked with markers
\r
447 <emphasis><<<<<<<</emphasis>, <emphasis>=======</emphasis>, and <emphasis>>>>>>>></emphasis>. The part before the <emphasis>=======</emphasis>
\r
448 is typically your side, and the part afterwards is typically their side.</simpara>
\r
449 <simpara>The default format does not show what the original said in the conflicting
\r
450 area. You cannot tell how many lines are deleted and replaced with
\r
451 Barbie's remark on your side. The only thing you can tell is that your
\r
452 side wants to say it is hard and you'd prefer to go shopping, while the
\r
453 other side wants to claim it is easy.</simpara>
\r
454 <simpara>An alternative style can be used by setting the "merge.conflictstyle"
\r
455 configuration variable to "diff3". In "diff3" style, the above conflict
\r
456 may look like this:</simpara>
\r
457 <screen>Here are lines that are either unchanged from the common
\r
458 ancestor, or cleanly resolved because only one side changed.
\r
459 <<<<<<< yours:sample.txt
\r
460 Conflict resolution is hard;
\r
463 Conflict resolution is hard.
\r
465 Git makes conflict resolution easy.
\r
466 >>>>>>> theirs:sample.txt
\r
467 And here is another line that is cleanly resolved or unmodified.</screen>
\r
468 <simpara>In addition to the <emphasis><<<<<<<</emphasis>, <emphasis>=======</emphasis>, and <emphasis>>>>>>>></emphasis> markers, it uses
\r
469 another <emphasis>|||||||</emphasis> marker that is followed by the original text. You can
\r
470 tell that the original just stated a fact, and your side simply gave in to
\r
471 that statement and gave up, while the other side tried to have a more
\r
472 positive attitude. You can sometimes come up with a better resolution by
\r
473 viewing the original.</simpara>
\r
475 <simplesect id="_how_to_resolve_conflicts">
\r
476 <title>HOW TO RESOLVE CONFLICTS</title>
\r
477 <simpara>After seeing a conflict, you can do two things:</simpara>
\r
481 Decide not to merge. The only clean-ups you need are to reset
\r
482 the index file to the <emphasis>HEAD</emphasis> commit to reverse 2. and to clean
\r
483 up working tree changes made by 2. and 3.; <emphasis>git merge --abort</emphasis>
\r
484 can be used for this.
\r
489 Resolve the conflicts. Git will mark the conflicts in
\r
490 the working tree. Edit the files into shape and
\r
491 <emphasis>git add</emphasis> them to the index. Use <emphasis>git commit</emphasis> to seal the deal.
\r
495 <simpara>You can work through the conflict with a number of tools:</simpara>
\r
499 Use a mergetool. <emphasis>git mergetool</emphasis> to launch a graphical
\r
500 mergetool which will work you through the merge.
\r
505 Look at the diffs. <emphasis>git diff</emphasis> will show a three-way diff,
\r
506 highlighting changes from both the <emphasis>HEAD</emphasis> and <emphasis>MERGE_HEAD</emphasis>
\r
512 Look at the diffs from each branch. <emphasis>git log --merge -p <path></emphasis>
\r
513 will show diffs first for the <emphasis>HEAD</emphasis> version and then the
\r
514 <emphasis>MERGE_HEAD</emphasis> version.
\r
519 Look at the originals. <emphasis>git show :1:filename</emphasis> shows the
\r
520 common ancestor, <emphasis>git show :2:filename</emphasis> shows the <emphasis>HEAD</emphasis>
\r
521 version, and <emphasis>git show :3:filename</emphasis> shows the <emphasis>MERGE_HEAD</emphasis>
\r
527 <simplesect id="_examples">
\r
528 <title>EXAMPLES</title>
\r
532 Merge branches <emphasis>fixes</emphasis> and <emphasis>enhancements</emphasis> on top of
\r
533 the current branch, making an octopus merge:
\r
535 <screen>$ git merge fixes enhancements</screen>
\r
539 Merge branch <emphasis>obsolete</emphasis> into the current branch, using <emphasis>ours</emphasis>
\r
542 <screen>$ git merge -s ours obsolete</screen>
\r
546 Merge branch <emphasis>maint</emphasis> into the current branch, but do not make
\r
547 a new commit automatically:
\r
549 <screen>$ git merge --no-commit maint</screen>
\r
550 <simpara>This can be used when you want to include further changes to the
\r
551 merge, or want to write your own merge commit message.</simpara>
\r
552 <simpara>You should refrain from abusing this option to sneak substantial
\r
553 changes into a merge commit. Small fixups like bumping
\r
554 release/version name would be acceptable.</simpara>
\r
558 <simplesect id="_merge_strategies">
\r
559 <title>MERGE STRATEGIES</title>
\r
560 <simpara>The merge mechanism (<emphasis>git-merge</emphasis> and <emphasis>git-pull</emphasis> commands) allows the
\r
561 backend <emphasis>merge strategies</emphasis> to be chosen with <emphasis>-s</emphasis> option. Some strategies
\r
562 can also take their own options, which can be passed by giving <emphasis>-X<option></emphasis>
\r
563 arguments to <emphasis>git-merge</emphasis> and/or <emphasis>git-pull</emphasis>.</simpara>
\r
571 This can only resolve two heads (i.e. the current branch
\r
572 and another branch you pulled from) using a 3-way merge
\r
573 algorithm. It tries to carefully detect criss-cross
\r
574 merge ambiguities and is considered generally safe and
\r
585 This can only resolve two heads using a 3-way merge
\r
586 algorithm. When there is more than one common
\r
587 ancestor that can be used for 3-way merge, it creates a
\r
588 merged tree of the common ancestors and uses that as
\r
589 the reference tree for the 3-way merge. This has been
\r
590 reported to result in fewer merge conflicts without
\r
591 causing mis-merges by tests done on actual merge commits
\r
592 taken from Linux 2.6 kernel development history.
\r
593 Additionally this can detect and handle merges involving
\r
594 renames. This is the default merge strategy when
\r
595 pulling or merging one branch.
\r
597 <simpara>The <emphasis>recursive</emphasis> strategy can take the following options:</simpara>
\r
605 This option forces conflicting hunks to be auto-resolved cleanly by
\r
606 favoring <emphasis>our</emphasis> version. Changes from the other tree that do not
\r
607 conflict with our side are reflected to the merge result.
\r
609 <simpara>This should not be confused with the <emphasis>ours</emphasis> merge strategy, which does not
\r
610 even look at what the other tree contains at all. It discards everything
\r
611 the other tree did, declaring <emphasis>our</emphasis> history contains all that happened in it.</simpara>
\r
620 This is opposite of <emphasis>ours</emphasis>.
\r
630 With this option, <emphasis>merge-recursive</emphasis> spends a little extra time
\r
631 to avoid mismerges that sometimes occur due to unimportant
\r
632 matching lines (e.g., braces from distinct functions). Use
\r
633 this when the branches to be merged have diverged wildly.
\r
634 See also <xref linkend="git-diff(1)" /> <emphasis>--patience</emphasis>.
\r
640 ignore-space-change
\r
646 ignore-space-at-eol
\r
650 Treats lines with the indicated type of whitespace change as
\r
651 unchanged for the sake of a three-way merge. Whitespace
\r
652 changes mixed with other changes to a line are not ignored.
\r
653 See also <xref linkend="git-diff(1)" /> <emphasis>-b</emphasis>, <emphasis>-w</emphasis>, and
\r
654 <emphasis>--ignore-space-at-eol</emphasis>.
\r
659 If <emphasis>their</emphasis> version only introduces whitespace changes to a line,
\r
660 <emphasis>our</emphasis> version is used;
\r
665 If <emphasis>our</emphasis> version introduces whitespace changes but <emphasis>their</emphasis>
\r
666 version includes a substantial change, <emphasis>their</emphasis> version is used;
\r
671 Otherwise, the merge proceeds in the usual way.
\r
683 This runs a virtual check-out and check-in of all three stages
\r
684 of a file when resolving a three-way merge. This option is
\r
685 meant to be used when merging branches with different clean
\r
686 filters or end-of-line normalization rules. See "Merging
\r
687 branches with differing checkin/checkout attributes" in
\r
688 <xref linkend="gitattributes(5)" /> for details.
\r
698 Disables the <emphasis>renormalize</emphasis> option. This overrides the
\r
699 <emphasis>merge.renormalize</emphasis> configuration variable.
\r
705 rename-threshold=<n>
\r
709 Controls the similarity threshold used for rename detection.
\r
710 See also <xref linkend="git-diff(1)" /> <emphasis>-M</emphasis>.
\r
716 subtree[=<path>]
\r
720 This option is a more advanced form of <emphasis>subtree</emphasis> strategy, where
\r
721 the strategy makes a guess on how two trees must be shifted to
\r
722 match with each other when merging. Instead, the specified path
\r
723 is prefixed (or stripped from the beginning) to make the shape of
\r
724 two trees to match.
\r
737 This resolves cases with more than two heads, but refuses to do
\r
738 a complex merge that needs manual resolution. It is
\r
739 primarily meant to be used for bundling topic branch
\r
740 heads together. This is the default merge strategy when
\r
741 pulling or merging more than one branch.
\r
751 This resolves any number of heads, but the resulting tree of the
\r
752 merge is always that of the current branch head, effectively
\r
753 ignoring all changes from all other branches. It is meant to
\r
754 be used to supersede old development history of side
\r
755 branches. Note that this is different from the -Xours option to
\r
756 the <emphasis>recursive</emphasis> merge strategy.
\r
766 This is a modified recursive strategy. When merging trees A and
\r
767 B, if B corresponds to a subtree of A, B is first adjusted to
\r
768 match the tree structure of A, instead of reading the trees at
\r
769 the same level. This adjustment is also done to the common
\r
776 <simplesect id="_configuration">
\r
777 <title>CONFIGURATION</title>
\r
781 merge.conflictstyle
\r
785 Specify the style in which conflicted hunks are written out to
\r
786 working tree files upon merge. The default is "merge", which
\r
787 shows a <emphasis><<<<<<<</emphasis> conflict marker, changes made by one side,
\r
788 a <emphasis>=======</emphasis> marker, changes made by the other side, and then
\r
789 a <emphasis>>>>>>>></emphasis> marker. An alternate style, "diff3", adds a <emphasis>|||||||</emphasis>
\r
790 marker and the original text before the <emphasis>=======</emphasis> marker.
\r
796 merge.defaultToUpstream
\r
800 If merge is called without any commit argument, merge the upstream
\r
801 branches configured for the current branch by using their last
\r
802 observed values stored in their remote tracking branches.
\r
803 The values of the <emphasis>branch.<current branch>.merge</emphasis> that name the
\r
804 branches at the remote named by <emphasis>branch.<current branch>.remote</emphasis>
\r
805 are consulted, and then they are mapped via <emphasis>remote.<remote>.fetch</emphasis>
\r
806 to their corresponding remote tracking branches, and the tips of
\r
807 these tracking branches are merged.
\r
817 By default, git does not create an extra merge commit when merging
\r
818 a commit that is a descendant of the current commit. Instead, the
\r
819 tip of the current branch is fast-forwarded. When set to <emphasis>false</emphasis>,
\r
820 this variable tells git to create an extra merge commit in such
\r
821 a case (equivalent to giving the <emphasis>--no-ff</emphasis> option from the command
\r
822 line). When set to <emphasis>only</emphasis>, only such fast-forward merges are
\r
823 allowed (equivalent to giving the <emphasis>--ff-only</emphasis> option from the
\r
834 In addition to branch names, populate the log message with at
\r
835 most the specified number of one-line descriptions from the
\r
836 actual commits that are being merged. Defaults to false, and
\r
837 true is a synonym for 20.
\r
847 The number of files to consider when performing rename detection
\r
848 during a merge; if not specified, defaults to the value of
\r
859 Tell git that canonical representation of files in the
\r
860 repository has changed over time (e.g. earlier commits record
\r
861 text files with CRLF line endings, but recent ones use LF line
\r
862 endings). In such a repository, git can convert the data
\r
863 recorded in commits to a canonical form before performing a
\r
864 merge to reduce unnecessary conflicts. For more information,
\r
865 see section "Merging branches with differing checkin/checkout
\r
866 attributes" in <xref linkend="gitattributes(5)" />.
\r
876 Whether to print the diffstat between ORIG_HEAD and the merge result
\r
877 at the end of the merge. True by default.
\r
887 Controls which merge resolution program is used by
\r
888 <xref linkend="git-mergetool(1)" />. Valid built-in values are: "araxis",
\r
889 "bc3", "diffuse", "ecmerge", "emerge", "gvimdiff", "kdiff3", "meld",
\r
890 "opendiff", "p4merge", "tkdiff", "tortoisemerge", "vimdiff"
\r
891 and "xxdiff". Any other value is treated is custom merge tool
\r
892 and there must be a corresponding mergetool.<tool>.cmd option.
\r
902 Controls the amount of output shown by the recursive merge
\r
903 strategy. Level 0 outputs nothing except a final error
\r
904 message if conflicts were detected. Level 1 outputs only
\r
905 conflicts, 2 outputs conflicts and file changes. Level 5 and
\r
906 above outputs debugging information. The default is level 2.
\r
907 Can be overridden by the <emphasis>GIT_MERGE_VERBOSITY</emphasis> environment variable.
\r
913 merge.<driver>.name
\r
917 Defines a human-readable name for a custom low-level
\r
918 merge driver. See <xref linkend="gitattributes(5)" /> for details.
\r
924 merge.<driver>.driver
\r
928 Defines the command that implements a custom low-level
\r
929 merge driver. See <xref linkend="gitattributes(5)" /> for details.
\r
935 merge.<driver>.recursive
\r
939 Names a low-level merge driver to be used when
\r
940 performing an internal merge between common ancestors.
\r
941 See <xref linkend="gitattributes(5)" /> for details.
\r
947 branch.<name>.mergeoptions
\r
951 Sets default options for merging into branch <name>. The syntax and
\r
952 supported options are the same as those of <emphasis>git merge</emphasis>, but option
\r
953 values containing whitespace characters are currently not supported.
\r
959 <simplesect id="_see_also">
\r
960 <title>SEE ALSO</title>
\r
961 <simpara><xref linkend="git-fmt-merge-msg(1)" />, <xref linkend="git-pull(1)" />,
\r
962 <xref linkend="gitattributes(5)" />,
\r
963 <xref linkend="git-reset(1)" />,
\r
964 <xref linkend="git-diff(1)" />, <xref linkend="git-ls-files(1)" />,
\r
965 <xref linkend="git-add(1)" />, <xref linkend="git-rm(1)" />,
\r
966 <xref linkend="git-mergetool(1)" /></simpara>
\r
968 <simplesect id="_git">
\r
970 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
\r