Autogenerated HTML docs for v2.39.0-rc0-49-g083e0
[git-htmldocs.git] / git-merge.html
blob47911ada88e873cc0d5c892b1c14d7def2978643
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
7 <meta name="generator" content="AsciiDoc 10.2.0" />
8 <title>git-merge(1)</title>
9 <style type="text/css">
10 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
12 /* Default font. */
13 body {
14 font-family: Georgia,serif;
17 /* Title font. */
18 h1, h2, h3, h4, h5, h6,
19 div.title, caption.title,
20 thead, p.table.header,
21 #toctitle,
22 #author, #revnumber, #revdate, #revremark,
23 #footer {
24 font-family: Arial,Helvetica,sans-serif;
27 body {
28 margin: 1em 5% 1em 5%;
31 a {
32 color: blue;
33 text-decoration: underline;
35 a:visited {
36 color: fuchsia;
39 em {
40 font-style: italic;
41 color: navy;
44 strong {
45 font-weight: bold;
46 color: #083194;
49 h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
51 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
56 h1, h2, h3 {
57 border-bottom: 2px solid silver;
59 h2 {
60 padding-top: 0.5em;
62 h3 {
63 float: left;
65 h3 + * {
66 clear: left;
68 h5 {
69 font-size: 1.0em;
72 div.sectionbody {
73 margin-left: 0;
76 hr {
77 border: 1px solid silver;
80 p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
85 ul, ol, li > p {
86 margin-top: 0;
88 ul > li { color: #aaa; }
89 ul > li > * { color: black; }
91 .monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
95 padding: 0;
96 margin: 0;
98 pre {
99 white-space: pre-wrap;
102 #author {
103 color: #527bbd;
104 font-weight: bold;
105 font-size: 1.1em;
107 #email {
109 #revnumber, #revdate, #revremark {
112 #footer {
113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
118 #footer-text {
119 float: left;
120 padding-bottom: 0.5em;
122 #footer-badges {
123 float: right;
124 padding-bottom: 0.5em;
127 #preamble {
128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
131 div.imageblock, div.exampleblock, div.verseblock,
132 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133 div.admonitionblock {
134 margin-top: 1.0em;
135 margin-bottom: 1.5em;
137 div.admonitionblock {
138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
144 div.content { /* Block element content. */
145 padding: 0;
148 /* Block element titles. */
149 div.title, caption.title {
150 color: #527bbd;
151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
156 div.title + * {
157 margin-top: 0;
160 td div.title:first-child {
161 margin-top: 0.0em;
163 div.content div.title:first-child {
164 margin-top: 0.0em;
166 div.content + div.title {
167 margin-top: 0.0em;
170 div.sidebarblock > div.content {
171 background: #ffffee;
172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
174 padding: 0.5em;
177 div.listingblock > div.content {
178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
181 padding: 0.5em;
184 div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
187 margin-right: 10%;
188 border-left: 5px solid #f0f0f0;
189 color: #888;
192 div.quoteblock > div.attribution {
193 padding-top: 0.5em;
194 text-align: right;
197 div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
201 div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
205 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
206 div.verseblock + div.attribution {
207 text-align: left;
210 div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
218 div.admonitionblock td.content {
219 padding-left: 0.5em;
220 border-left: 3px solid #dddddd;
223 div.exampleblock > div.content {
224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
228 div.imageblock div.content { padding-left: 0; }
229 span.image img { border-style: none; vertical-align: text-bottom; }
230 a.image:visited { color: white; }
232 dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
236 dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
239 font-style: normal;
240 color: navy;
242 dd > *:first-child {
243 margin-top: 0.1em;
246 ul, ol {
247 list-style-position: outside;
249 ol.arabic {
250 list-style-type: decimal;
252 ol.loweralpha {
253 list-style-type: lower-alpha;
255 ol.upperalpha {
256 list-style-type: upper-alpha;
258 ol.lowerroman {
259 list-style-type: lower-roman;
261 ol.upperroman {
262 list-style-type: upper-roman;
265 div.compact ul, div.compact ol,
266 div.compact p, div.compact p,
267 div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
272 tfoot {
273 font-weight: bold;
275 td > div.verse {
276 white-space: pre;
279 div.hdlist {
280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
283 div.hdlist tr {
284 padding-bottom: 15px;
286 dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
289 td.hdlist1 {
290 vertical-align: top;
291 font-style: normal;
292 padding-right: 0.8em;
293 color: navy;
295 td.hdlist2 {
296 vertical-align: top;
298 div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
303 .comment {
304 background: yellow;
307 .footnote, .footnoteref {
308 font-size: 0.8em;
311 span.footnote, span.footnoteref {
312 vertical-align: super;
315 #footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
320 #footnotes div.footnote {
321 margin: 0 0 5px 0;
324 #footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
334 div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
339 div.colist td img {
340 margin-top: 0.3em;
343 @media print {
344 #footer-badges { display: none; }
347 #toc {
348 margin-bottom: 2.5em;
351 #toctitle {
352 color: #527bbd;
353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
359 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
360 margin-top: 0;
361 margin-bottom: 0;
363 div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
367 div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
371 div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
376 span.aqua { color: aqua; }
377 span.black { color: black; }
378 span.blue { color: blue; }
379 span.fuchsia { color: fuchsia; }
380 span.gray { color: gray; }
381 span.green { color: green; }
382 span.lime { color: lime; }
383 span.maroon { color: maroon; }
384 span.navy { color: navy; }
385 span.olive { color: olive; }
386 span.purple { color: purple; }
387 span.red { color: red; }
388 span.silver { color: silver; }
389 span.teal { color: teal; }
390 span.white { color: white; }
391 span.yellow { color: yellow; }
393 span.aqua-background { background: aqua; }
394 span.black-background { background: black; }
395 span.blue-background { background: blue; }
396 span.fuchsia-background { background: fuchsia; }
397 span.gray-background { background: gray; }
398 span.green-background { background: green; }
399 span.lime-background { background: lime; }
400 span.maroon-background { background: maroon; }
401 span.navy-background { background: navy; }
402 span.olive-background { background: olive; }
403 span.purple-background { background: purple; }
404 span.red-background { background: red; }
405 span.silver-background { background: silver; }
406 span.teal-background { background: teal; }
407 span.white-background { background: white; }
408 span.yellow-background { background: yellow; }
410 span.big { font-size: 2em; }
411 span.small { font-size: 0.6em; }
413 span.underline { text-decoration: underline; }
414 span.overline { text-decoration: overline; }
415 span.line-through { text-decoration: line-through; }
417 div.unbreakable { page-break-inside: avoid; }
421 * xhtml11 specific
423 * */
425 div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
429 div.tableblock > table {
430 border: 3px solid #527bbd;
432 thead, p.table.header {
433 font-weight: bold;
434 color: #527bbd;
436 p.table {
437 margin-top: 0;
439 /* Because the table frame attribute is overridden by CSS in most browsers. */
440 div.tableblock > table[frame="void"] {
441 border-style: none;
443 div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
447 div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
454 * html5 specific
456 * */
458 table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
462 thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
466 p.tableblock {
467 margin-top: 0;
469 table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
476 th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
483 table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
487 table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
491 table.tableblock.frame-none {
492 border-style: hidden;
495 th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
498 th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
501 th.tableblock.halign-right, td.tableblock.halign-right {
502 text-align: right;
505 th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
508 th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
511 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
517 * manpage specific
519 * */
521 body.manpage h1 {
522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
527 body.manpage h2 {
528 border-style: none;
530 body.manpage div.sectionbody {
531 margin-left: 3em;
534 @media print {
535 body.manpage div#toc { display: none; }
539 </style>
540 <script type="text/javascript">
541 /*<![CDATA[*/
542 var asciidoc = { // Namespace.
544 /////////////////////////////////////////////////////////////////////
545 // Table Of Contents generator
546 /////////////////////////////////////////////////////////////////////
548 /* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
551 * Table Of Content generator
552 * Version: 0.4
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
561 // toclevels = 1..4.
562 toc: function (toclevels) {
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
572 return text;
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
594 iterate(i);
598 iterate(el);
599 return result;
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
640 /////////////////////////////////////////////////////////////////////
641 // Footnotes generator
642 /////////////////////////////////////////////////////////////////////
644 /* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
648 footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
708 install: function(toclevels) {
709 var timerId;
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
731 asciidoc.install();
732 /*]]>*/
733 </script>
734 </head>
735 <body class="manpage">
736 <div id="header">
737 <h1>
738 git-merge(1) Manual Page
739 </h1>
740 <h2>NAME</h2>
741 <div class="sectionbody">
742 <p>git-merge -
743 Join two or more development histories together
744 </p>
745 </div>
746 </div>
747 <div id="content">
748 <div class="sect1">
749 <h2 id="_synopsis">SYNOPSIS</h2>
750 <div class="sectionbody">
751 <div class="verseblock">
752 <pre class="content"><em>git merge</em> [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
753 [--no-verify] [-s &lt;strategy&gt;] [-X &lt;strategy-option&gt;] [-S[&lt;keyid&gt;]]
754 [--[no-]allow-unrelated-histories]
755 [--[no-]rerere-autoupdate] [-m &lt;msg&gt;] [-F &lt;file&gt;]
756 [--into-name &lt;branch&gt;] [&lt;commit&gt;&#8230;]
757 <em>git merge</em> (--continue | --abort | --quit)</pre>
758 <div class="attribution">
759 </div></div>
760 </div>
761 </div>
762 <div class="sect1">
763 <h2 id="_description">DESCRIPTION</h2>
764 <div class="sectionbody">
765 <div class="paragraph"><p>Incorporates changes from the named commits (since the time their
766 histories diverged from the current branch) into the current
767 branch. This command is used by <em>git pull</em> to incorporate changes
768 from another repository and can be used by hand to merge changes
769 from one branch into another.</p></div>
770 <div class="paragraph"><p>Assume the following history exists and the current branch is
771 "<code>master</code>":</p></div>
772 <div class="listingblock">
773 <div class="content">
774 <pre><code> A---B---C topic
776 D---E---F---G master</code></pre>
777 </div></div>
778 <div class="paragraph"><p>Then "<code>git merge topic</code>" will replay the changes made on the
779 <code>topic</code> branch since it diverged from <code>master</code> (i.e., <code>E</code>) until
780 its current commit (<code>C</code>) on top of <code>master</code>, and record the result
781 in a new commit along with the names of the two parent commits and
782 a log message from the user describing the changes.</p></div>
783 <div class="listingblock">
784 <div class="content">
785 <pre><code> A---B---C topic
787 D---E---F---G---H master</code></pre>
788 </div></div>
789 <div class="paragraph"><p>The second syntax ("<code>git merge --abort</code>") can only be run after the
790 merge has resulted in conflicts. <em>git merge --abort</em> will abort the
791 merge process and try to reconstruct the pre-merge state. However,
792 if there were uncommitted changes when the merge started (and
793 especially if those changes were further modified after the merge
794 was started), <em>git merge --abort</em> will in some cases be unable to
795 reconstruct the original (pre-merge) changes. Therefore:</p></div>
796 <div class="paragraph"><p><strong>Warning</strong>: Running <em>git merge</em> with non-trivial uncommitted changes is
797 discouraged: while possible, it may leave you in a state that is hard to
798 back out of in the case of a conflict.</p></div>
799 <div class="paragraph"><p>The third syntax ("<code>git merge --continue</code>") can only be run after the
800 merge has resulted in conflicts.</p></div>
801 </div>
802 </div>
803 <div class="sect1">
804 <h2 id="_options">OPTIONS</h2>
805 <div class="sectionbody">
806 <div class="dlist"><dl>
807 <dt class="hdlist1">
808 --commit
809 </dt>
810 <dt class="hdlist1">
811 --no-commit
812 </dt>
813 <dd>
815 Perform the merge and commit the result. This option can
816 be used to override --no-commit.
817 </p>
818 <div class="paragraph"><p>With --no-commit perform the merge and stop just before creating
819 a merge commit, to give the user a chance to inspect and further
820 tweak the merge result before committing.</p></div>
821 <div class="paragraph"><p>Note that fast-forward updates do not create a merge commit and
822 therefore there is no way to stop those merges with --no-commit.
823 Thus, if you want to ensure your branch is not changed or updated
824 by the merge command, use --no-ff with --no-commit.</p></div>
825 </dd>
826 <dt class="hdlist1">
827 --edit
828 </dt>
829 <dt class="hdlist1">
831 </dt>
832 <dt class="hdlist1">
833 --no-edit
834 </dt>
835 <dd>
837 Invoke an editor before committing successful mechanical merge to
838 further edit the auto-generated merge message, so that the user
839 can explain and justify the merge. The <code>--no-edit</code> option can be
840 used to accept the auto-generated message (this is generally
841 discouraged).
842 The <code>--edit</code> (or <code>-e</code>) option is still useful if you are
843 giving a draft message with the <code>-m</code> option from the command line
844 and want to edit it in the editor.
845 </p>
846 <div class="paragraph"><p>Older scripts may depend on the historical behaviour of not allowing the
847 user to edit the merge log message. They will see an editor opened when
848 they run <code>git merge</code>. To make it easier to adjust such scripts to the
849 updated behaviour, the environment variable <code>GIT_MERGE_AUTOEDIT</code> can be
850 set to <code>no</code> at the beginning of them.</p></div>
851 </dd>
852 <dt class="hdlist1">
853 --cleanup=&lt;mode&gt;
854 </dt>
855 <dd>
857 This option determines how the merge message will be cleaned up before
858 committing. See <a href="git-commit.html">git-commit(1)</a> for more details. In addition, if
859 the <em>&lt;mode&gt;</em> is given a value of <code>scissors</code>, scissors will be appended
860 to <code>MERGE_MSG</code> before being passed on to the commit machinery in the
861 case of a merge conflict.
862 </p>
863 </dd>
864 <dt class="hdlist1">
865 --ff
866 </dt>
867 <dt class="hdlist1">
868 --no-ff
869 </dt>
870 <dt class="hdlist1">
871 --ff-only
872 </dt>
873 <dd>
875 Specifies how a merge is handled when the merged-in history is
876 already a descendant of the current history. <code>--ff</code> is the
877 default unless merging an annotated (and possibly signed) tag
878 that is not stored in its natural place in the <code>refs/tags/</code>
879 hierarchy, in which case <code>--no-ff</code> is assumed.
880 </p>
881 <div class="paragraph"><p>With <code>--ff</code>, when possible resolve the merge as a fast-forward (only
882 update the branch pointer to match the merged branch; do not create a
883 merge commit). When not possible (when the merged-in history is not a
884 descendant of the current history), create a merge commit.</p></div>
885 <div class="paragraph"><p>With <code>--no-ff</code>, create a merge commit in all cases, even when the merge
886 could instead be resolved as a fast-forward.</p></div>
887 <div class="paragraph"><p>With <code>--ff-only</code>, resolve the merge as a fast-forward when possible.
888 When not possible, refuse to merge and exit with a non-zero status.</p></div>
889 </dd>
890 <dt class="hdlist1">
891 -S[&lt;keyid&gt;]
892 </dt>
893 <dt class="hdlist1">
894 --gpg-sign[=&lt;keyid&gt;]
895 </dt>
896 <dt class="hdlist1">
897 --no-gpg-sign
898 </dt>
899 <dd>
901 GPG-sign the resulting merge commit. The <code>keyid</code> argument is
902 optional and defaults to the committer identity; if specified,
903 it must be stuck to the option without a space. <code>--no-gpg-sign</code>
904 is useful to countermand both <code>commit.gpgSign</code> configuration variable,
905 and earlier <code>--gpg-sign</code>.
906 </p>
907 </dd>
908 <dt class="hdlist1">
909 --log[=&lt;n&gt;]
910 </dt>
911 <dt class="hdlist1">
912 --no-log
913 </dt>
914 <dd>
916 In addition to branch names, populate the log message with
917 one-line descriptions from at most &lt;n&gt; actual commits that are being
918 merged. See also <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>.
919 </p>
920 <div class="paragraph"><p>With --no-log do not list one-line descriptions from the
921 actual commits being merged.</p></div>
922 </dd>
923 <dt class="hdlist1">
924 --signoff
925 </dt>
926 <dt class="hdlist1">
927 --no-signoff
928 </dt>
929 <dd>
931 Add a <code>Signed-off-by</code> trailer by the committer at the end of the commit
932 log message. The meaning of a signoff depends on the project
933 to which you&#8217;re committing. For example, it may certify that
934 the committer has the rights to submit the work under the
935 project&#8217;s license or agrees to some contributor representation,
936 such as a Developer Certificate of Origin.
937 (See <a href="http://developercertificate.org">http://developercertificate.org</a> for the one used by the
938 Linux kernel and Git projects.) Consult the documentation or
939 leadership of the project to which you&#8217;re contributing to
940 understand how the signoffs are used in that project.
941 </p>
942 <div class="paragraph"><p>The --no-signoff option can be used to countermand an earlier --signoff
943 option on the command line.</p></div>
944 </dd>
945 <dt class="hdlist1">
946 --stat
947 </dt>
948 <dt class="hdlist1">
950 </dt>
951 <dt class="hdlist1">
952 --no-stat
953 </dt>
954 <dd>
956 Show a diffstat at the end of the merge. The diffstat is also
957 controlled by the configuration option merge.stat.
958 </p>
959 <div class="paragraph"><p>With -n or --no-stat do not show a diffstat at the end of the
960 merge.</p></div>
961 </dd>
962 <dt class="hdlist1">
963 --squash
964 </dt>
965 <dt class="hdlist1">
966 --no-squash
967 </dt>
968 <dd>
970 Produce the working tree and index state as if a real merge
971 happened (except for the merge information), but do not actually
972 make a commit, move the <code>HEAD</code>, or record <code>$GIT_DIR/MERGE_HEAD</code>
973 (to cause the next <code>git commit</code> command to create a merge
974 commit). This allows you to create a single commit on top of
975 the current branch whose effect is the same as merging another
976 branch (or more in case of an octopus).
977 </p>
978 <div class="paragraph"><p>With --no-squash perform the merge and commit the result. This
979 option can be used to override --squash.</p></div>
980 <div class="paragraph"><p>With --squash, --commit is not allowed, and will fail.</p></div>
981 </dd>
982 <dt class="hdlist1">
983 --[no-]verify
984 </dt>
985 <dd>
987 By default, the pre-merge and commit-msg hooks are run.
988 When <code>--no-verify</code> is given, these are bypassed.
989 See also <a href="githooks.html">githooks(5)</a>.
990 </p>
991 </dd>
992 <dt class="hdlist1">
993 -s &lt;strategy&gt;
994 </dt>
995 <dt class="hdlist1">
996 --strategy=&lt;strategy&gt;
997 </dt>
998 <dd>
1000 Use the given merge strategy; can be supplied more than
1001 once to specify them in the order they should be tried.
1002 If there is no <code>-s</code> option, a built-in list of strategies
1003 is used instead (<code>ort</code> when merging a single head,
1004 <code>octopus</code> otherwise).
1005 </p>
1006 </dd>
1007 <dt class="hdlist1">
1008 -X &lt;option&gt;
1009 </dt>
1010 <dt class="hdlist1">
1011 --strategy-option=&lt;option&gt;
1012 </dt>
1013 <dd>
1015 Pass merge strategy specific option through to the merge
1016 strategy.
1017 </p>
1018 </dd>
1019 <dt class="hdlist1">
1020 --verify-signatures
1021 </dt>
1022 <dt class="hdlist1">
1023 --no-verify-signatures
1024 </dt>
1025 <dd>
1027 Verify that the tip commit of the side branch being merged is
1028 signed with a valid key, i.e. a key that has a valid uid: in the
1029 default trust model, this means the signing key has been signed by
1030 a trusted key. If the tip commit of the side branch is not signed
1031 with a valid key, the merge is aborted.
1032 </p>
1033 </dd>
1034 <dt class="hdlist1">
1035 --summary
1036 </dt>
1037 <dt class="hdlist1">
1038 --no-summary
1039 </dt>
1040 <dd>
1042 Synonyms to --stat and --no-stat; these are deprecated and will be
1043 removed in the future.
1044 </p>
1045 </dd>
1046 <dt class="hdlist1">
1048 </dt>
1049 <dt class="hdlist1">
1050 --quiet
1051 </dt>
1052 <dd>
1054 Operate quietly. Implies --no-progress.
1055 </p>
1056 </dd>
1057 <dt class="hdlist1">
1059 </dt>
1060 <dt class="hdlist1">
1061 --verbose
1062 </dt>
1063 <dd>
1065 Be verbose.
1066 </p>
1067 </dd>
1068 <dt class="hdlist1">
1069 --progress
1070 </dt>
1071 <dt class="hdlist1">
1072 --no-progress
1073 </dt>
1074 <dd>
1076 Turn progress on/off explicitly. If neither is specified,
1077 progress is shown if standard error is connected to a terminal.
1078 Note that not all merge strategies may support progress
1079 reporting.
1080 </p>
1081 </dd>
1082 <dt class="hdlist1">
1083 --autostash
1084 </dt>
1085 <dt class="hdlist1">
1086 --no-autostash
1087 </dt>
1088 <dd>
1090 Automatically create a temporary stash entry before the operation
1091 begins, record it in the special ref <code>MERGE_AUTOSTASH</code>
1092 and apply it after the operation ends. This means
1093 that you can run the operation on a dirty worktree. However, use
1094 with care: the final stash application after a successful
1095 merge might result in non-trivial conflicts.
1096 </p>
1097 </dd>
1098 <dt class="hdlist1">
1099 --allow-unrelated-histories
1100 </dt>
1101 <dd>
1103 By default, <code>git merge</code> command refuses to merge histories
1104 that do not share a common ancestor. This option can be
1105 used to override this safety when merging histories of two
1106 projects that started their lives independently. As that is
1107 a very rare occasion, no configuration variable to enable
1108 this by default exists and will not be added.
1109 </p>
1110 </dd>
1111 <dt class="hdlist1">
1112 -m &lt;msg&gt;
1113 </dt>
1114 <dd>
1116 Set the commit message to be used for the merge commit (in
1117 case one is created).
1118 </p>
1119 <div class="paragraph"><p>If <code>--log</code> is specified, a shortlog of the commits being merged
1120 will be appended to the specified message.</p></div>
1121 <div class="paragraph"><p>The <em>git fmt-merge-msg</em> command can be
1122 used to give a good default for automated <em>git merge</em>
1123 invocations. The automated message can include the branch description.</p></div>
1124 </dd>
1125 <dt class="hdlist1">
1126 --into-name &lt;branch&gt;
1127 </dt>
1128 <dd>
1130 Prepare the default merge message as if merging to the branch
1131 <code>&lt;branch&gt;</code>, instead of the name of the real branch to which
1132 the merge is made.
1133 </p>
1134 </dd>
1135 <dt class="hdlist1">
1136 -F &lt;file&gt;
1137 </dt>
1138 <dt class="hdlist1">
1139 --file=&lt;file&gt;
1140 </dt>
1141 <dd>
1143 Read the commit message to be used for the merge commit (in
1144 case one is created).
1145 </p>
1146 <div class="paragraph"><p>If <code>--log</code> is specified, a shortlog of the commits being merged
1147 will be appended to the specified message.</p></div>
1148 </dd>
1149 <dt class="hdlist1">
1150 --rerere-autoupdate
1151 </dt>
1152 <dt class="hdlist1">
1153 --no-rerere-autoupdate
1154 </dt>
1155 <dd>
1157 After the rerere mechanism reuses a recorded resolution on
1158 the current conflict to update the files in the working
1159 tree, allow it to also update the index with the result of
1160 resolution. <code>--no-rerere-autoupdate</code> is a good way to
1161 double-check what <code>rerere</code> did and catch potential
1162 mismerges, before committing the result to the index with a
1163 separate <code>git add</code>.
1164 </p>
1165 </dd>
1166 <dt class="hdlist1">
1167 --overwrite-ignore
1168 </dt>
1169 <dt class="hdlist1">
1170 --no-overwrite-ignore
1171 </dt>
1172 <dd>
1174 Silently overwrite ignored files from the merge result. This
1175 is the default behavior. Use <code>--no-overwrite-ignore</code> to abort.
1176 </p>
1177 </dd>
1178 <dt class="hdlist1">
1179 --abort
1180 </dt>
1181 <dd>
1183 Abort the current conflict resolution process, and
1184 try to reconstruct the pre-merge state. If an autostash entry is
1185 present, apply it to the worktree.
1186 </p>
1187 <div class="paragraph"><p>If there were uncommitted worktree changes present when the merge
1188 started, <em>git merge --abort</em> will in some cases be unable to
1189 reconstruct these changes. It is therefore recommended to always
1190 commit or stash your changes before running <em>git merge</em>.</p></div>
1191 <div class="paragraph"><p><em>git merge --abort</em> is equivalent to <em>git reset --merge</em> when
1192 <code>MERGE_HEAD</code> is present unless <code>MERGE_AUTOSTASH</code> is also present in
1193 which case <em>git merge --abort</em> applies the stash entry to the worktree
1194 whereas <em>git reset --merge</em> will save the stashed changes in the stash
1195 list.</p></div>
1196 </dd>
1197 <dt class="hdlist1">
1198 --quit
1199 </dt>
1200 <dd>
1202 Forget about the current merge in progress. Leave the index
1203 and the working tree as-is. If <code>MERGE_AUTOSTASH</code> is present, the
1204 stash entry will be saved to the stash list.
1205 </p>
1206 </dd>
1207 <dt class="hdlist1">
1208 --continue
1209 </dt>
1210 <dd>
1212 After a <em>git merge</em> stops due to conflicts you can conclude the
1213 merge by running <em>git merge --continue</em> (see "HOW TO RESOLVE
1214 CONFLICTS" section below).
1215 </p>
1216 </dd>
1217 <dt class="hdlist1">
1218 &lt;commit&gt;&#8230;
1219 </dt>
1220 <dd>
1222 Commits, usually other branch heads, to merge into our branch.
1223 Specifying more than one commit will create a merge with
1224 more than two parents (affectionately called an Octopus merge).
1225 </p>
1226 <div class="paragraph"><p>If no commit is given from the command line, merge the remote-tracking
1227 branches that the current branch is configured to use as its upstream.
1228 See also the configuration section of this manual page.</p></div>
1229 <div class="paragraph"><p>When <code>FETCH_HEAD</code> (and no other commit) is specified, the branches
1230 recorded in the <code>.git/FETCH_HEAD</code> file by the previous invocation
1231 of <code>git fetch</code> for merging are merged to the current branch.</p></div>
1232 </dd>
1233 </dl></div>
1234 </div>
1235 </div>
1236 <div class="sect1">
1237 <h2 id="_pre_merge_checks">PRE-MERGE CHECKS</h2>
1238 <div class="sectionbody">
1239 <div class="paragraph"><p>Before applying outside changes, you should get your own work in
1240 good shape and committed locally, so it will not be clobbered if
1241 there are conflicts. See also <a href="git-stash.html">git-stash(1)</a>.
1242 <em>git pull</em> and <em>git merge</em> will stop without doing anything when
1243 local uncommitted changes overlap with files that <em>git pull</em>/<em>git
1244 merge</em> may need to update.</p></div>
1245 <div class="paragraph"><p>To avoid recording unrelated changes in the merge commit,
1246 <em>git pull</em> and <em>git merge</em> will also abort if there are any changes
1247 registered in the index relative to the <code>HEAD</code> commit. (Special
1248 narrow exceptions to this rule may exist depending on which merge
1249 strategy is in use, but generally, the index must match HEAD.)</p></div>
1250 <div class="paragraph"><p>If all named commits are already ancestors of <code>HEAD</code>, <em>git merge</em>
1251 will exit early with the message "Already up to date."</p></div>
1252 </div>
1253 </div>
1254 <div class="sect1">
1255 <h2 id="_fast_forward_merge">FAST-FORWARD MERGE</h2>
1256 <div class="sectionbody">
1257 <div class="paragraph"><p>Often the current branch head is an ancestor of the named commit.
1258 This is the most common case especially when invoked from <em>git
1259 pull</em>: you are tracking an upstream repository, you have committed
1260 no local changes, and now you want to update to a newer upstream
1261 revision. In this case, a new commit is not needed to store the
1262 combined history; instead, the <code>HEAD</code> (along with the index) is
1263 updated to point at the named commit, without creating an extra
1264 merge commit.</p></div>
1265 <div class="paragraph"><p>This behavior can be suppressed with the <code>--no-ff</code> option.</p></div>
1266 </div>
1267 </div>
1268 <div class="sect1">
1269 <h2 id="_true_merge">TRUE MERGE</h2>
1270 <div class="sectionbody">
1271 <div class="paragraph"><p>Except in a fast-forward merge (see above), the branches to be
1272 merged must be tied together by a merge commit that has both of them
1273 as its parents.</p></div>
1274 <div class="paragraph"><p>A merged version reconciling the changes from all branches to be
1275 merged is committed, and your <code>HEAD</code>, index, and working tree are
1276 updated to it. It is possible to have modifications in the working
1277 tree as long as they do not overlap; the update will preserve them.</p></div>
1278 <div class="paragraph"><p>When it is not obvious how to reconcile the changes, the following
1279 happens:</p></div>
1280 <div class="olist arabic"><ol class="arabic">
1281 <li>
1283 The <code>HEAD</code> pointer stays the same.
1284 </p>
1285 </li>
1286 <li>
1288 The <code>MERGE_HEAD</code> ref is set to point to the other branch head.
1289 </p>
1290 </li>
1291 <li>
1293 Paths that merged cleanly are updated both in the index file and
1294 in your working tree.
1295 </p>
1296 </li>
1297 <li>
1299 For conflicting paths, the index file records up to three
1300 versions: stage 1 stores the version from the common ancestor,
1301 stage 2 from <code>HEAD</code>, and stage 3 from <code>MERGE_HEAD</code> (you
1302 can inspect the stages with <code>git ls-files -u</code>). The working
1303 tree files contain the result of the "merge" program; i.e. 3-way
1304 merge results with familiar conflict markers <code>&lt;&lt;&lt;</code> <code>===</code> <code>&gt;&gt;&gt;</code>.
1305 </p>
1306 </li>
1307 <li>
1309 No other changes are made. In particular, the local
1310 modifications you had before you started merge will stay the
1311 same and the index entries for them stay as they were,
1312 i.e. matching <code>HEAD</code>.
1313 </p>
1314 </li>
1315 </ol></div>
1316 <div class="paragraph"><p>If you tried a merge which resulted in complex conflicts and
1317 want to start over, you can recover with <code>git merge --abort</code>.</p></div>
1318 </div>
1319 </div>
1320 <div class="sect1">
1321 <h2 id="_merging_tag">MERGING TAG</h2>
1322 <div class="sectionbody">
1323 <div class="paragraph"><p>When merging an annotated (and possibly signed) tag, Git always
1324 creates a merge commit even if a fast-forward merge is possible, and
1325 the commit message template is prepared with the tag message.
1326 Additionally, if the tag is signed, the signature check is reported
1327 as a comment in the message template. See also <a href="git-tag.html">git-tag(1)</a>.</p></div>
1328 <div class="paragraph"><p>When you want to just integrate with the work leading to the commit
1329 that happens to be tagged, e.g. synchronizing with an upstream
1330 release point, you may not want to make an unnecessary merge commit.</p></div>
1331 <div class="paragraph"><p>In such a case, you can "unwrap" the tag yourself before feeding it
1332 to <code>git merge</code>, or pass <code>--ff-only</code> when you do not have any work on
1333 your own. e.g.</p></div>
1334 <div class="listingblock">
1335 <div class="content">
1336 <pre><code>git fetch origin
1337 git merge v1.2.3^0
1338 git merge --ff-only v1.2.3</code></pre>
1339 </div></div>
1340 </div>
1341 </div>
1342 <div class="sect1">
1343 <h2 id="_how_conflicts_are_presented">HOW CONFLICTS ARE PRESENTED</h2>
1344 <div class="sectionbody">
1345 <div class="paragraph"><p>During a merge, the working tree files are updated to reflect the result
1346 of the merge. Among the changes made to the common ancestor&#8217;s version,
1347 non-overlapping ones (that is, you changed an area of the file while the
1348 other side left that area intact, or vice versa) are incorporated in the
1349 final result verbatim. When both sides made changes to the same area,
1350 however, Git cannot randomly pick one side over the other, and asks you to
1351 resolve it by leaving what both sides did to that area.</p></div>
1352 <div class="paragraph"><p>By default, Git uses the same style as the one used by the "merge" program
1353 from the RCS suite to present such a conflicted hunk, like this:</p></div>
1354 <div class="listingblock">
1355 <div class="content">
1356 <pre><code>Here are lines that are either unchanged from the common
1357 ancestor, or cleanly resolved because only one side changed,
1358 or cleanly resolved because both sides changed the same way.
1359 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1360 Conflict resolution is hard;
1361 let's go shopping.
1362 =======
1363 Git makes conflict resolution easy.
1364 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1365 And here is another line that is cleanly resolved or unmodified.</code></pre>
1366 </div></div>
1367 <div class="paragraph"><p>The area where a pair of conflicting changes happened is marked with markers
1368 <code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</code>, <code>=======</code>, and <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code>. The part before the <code>=======</code>
1369 is typically your side, and the part afterwards is typically their side.</p></div>
1370 <div class="paragraph"><p>The default format does not show what the original said in the conflicting
1371 area. You cannot tell how many lines are deleted and replaced with
1372 Barbie&#8217;s remark on your side. The only thing you can tell is that your
1373 side wants to say it is hard and you&#8217;d prefer to go shopping, while the
1374 other side wants to claim it is easy.</p></div>
1375 <div class="paragraph"><p>An alternative style can be used by setting the "merge.conflictStyle"
1376 configuration variable to either "diff3" or "zdiff3". In "diff3"
1377 style, the above conflict may look like this:</p></div>
1378 <div class="listingblock">
1379 <div class="content">
1380 <pre><code>Here are lines that are either unchanged from the common
1381 ancestor, or cleanly resolved because only one side changed,
1382 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1383 or cleanly resolved because both sides changed the same way.
1384 Conflict resolution is hard;
1385 let's go shopping.
1386 ||||||| base:sample.txt
1387 or cleanly resolved because both sides changed identically.
1388 Conflict resolution is hard.
1389 =======
1390 or cleanly resolved because both sides changed the same way.
1391 Git makes conflict resolution easy.
1392 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1393 And here is another line that is cleanly resolved or unmodified.</code></pre>
1394 </div></div>
1395 <div class="paragraph"><p>while in "zdiff3" style, it may look like this:</p></div>
1396 <div class="listingblock">
1397 <div class="content">
1398 <pre><code>Here are lines that are either unchanged from the common
1399 ancestor, or cleanly resolved because only one side changed,
1400 or cleanly resolved because both sides changed the same way.
1401 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1402 Conflict resolution is hard;
1403 let's go shopping.
1404 ||||||| base:sample.txt
1405 or cleanly resolved because both sides changed identically.
1406 Conflict resolution is hard.
1407 =======
1408 Git makes conflict resolution easy.
1409 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1410 And here is another line that is cleanly resolved or unmodified.</code></pre>
1411 </div></div>
1412 <div class="paragraph"><p>In addition to the <code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</code>, <code>=======</code>, and <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code> markers, it uses
1413 another <code>|||||||</code> marker that is followed by the original text. You can
1414 tell that the original just stated a fact, and your side simply gave in to
1415 that statement and gave up, while the other side tried to have a more
1416 positive attitude. You can sometimes come up with a better resolution by
1417 viewing the original.</p></div>
1418 </div>
1419 </div>
1420 <div class="sect1">
1421 <h2 id="_how_to_resolve_conflicts">HOW TO RESOLVE CONFLICTS</h2>
1422 <div class="sectionbody">
1423 <div class="paragraph"><p>After seeing a conflict, you can do two things:</p></div>
1424 <div class="ulist"><ul>
1425 <li>
1427 Decide not to merge. The only clean-ups you need are to reset
1428 the index file to the <code>HEAD</code> commit to reverse 2. and to clean
1429 up working tree changes made by 2. and 3.; <code>git merge --abort</code>
1430 can be used for this.
1431 </p>
1432 </li>
1433 <li>
1435 Resolve the conflicts. Git will mark the conflicts in
1436 the working tree. Edit the files into shape and
1437 <em>git add</em> them to the index. Use <em>git commit</em> or
1438 <em>git merge --continue</em> to seal the deal. The latter command
1439 checks whether there is a (interrupted) merge in progress
1440 before calling <em>git commit</em>.
1441 </p>
1442 </li>
1443 </ul></div>
1444 <div class="paragraph"><p>You can work through the conflict with a number of tools:</p></div>
1445 <div class="ulist"><ul>
1446 <li>
1448 Use a mergetool. <code>git mergetool</code> to launch a graphical
1449 mergetool which will work you through the merge.
1450 </p>
1451 </li>
1452 <li>
1454 Look at the diffs. <code>git diff</code> will show a three-way diff,
1455 highlighting changes from both the <code>HEAD</code> and <code>MERGE_HEAD</code>
1456 versions.
1457 </p>
1458 </li>
1459 <li>
1461 Look at the diffs from each branch. <code>git log --merge -p &lt;path&gt;</code>
1462 will show diffs first for the <code>HEAD</code> version and then the
1463 <code>MERGE_HEAD</code> version.
1464 </p>
1465 </li>
1466 <li>
1468 Look at the originals. <code>git show :1:filename</code> shows the
1469 common ancestor, <code>git show :2:filename</code> shows the <code>HEAD</code>
1470 version, and <code>git show :3:filename</code> shows the <code>MERGE_HEAD</code>
1471 version.
1472 </p>
1473 </li>
1474 </ul></div>
1475 </div>
1476 </div>
1477 <div class="sect1">
1478 <h2 id="_examples">EXAMPLES</h2>
1479 <div class="sectionbody">
1480 <div class="ulist"><ul>
1481 <li>
1483 Merge branches <code>fixes</code> and <code>enhancements</code> on top of
1484 the current branch, making an octopus merge:
1485 </p>
1486 <div class="listingblock">
1487 <div class="content">
1488 <pre><code>$ git merge fixes enhancements</code></pre>
1489 </div></div>
1490 </li>
1491 <li>
1493 Merge branch <code>obsolete</code> into the current branch, using <code>ours</code>
1494 merge strategy:
1495 </p>
1496 <div class="listingblock">
1497 <div class="content">
1498 <pre><code>$ git merge -s ours obsolete</code></pre>
1499 </div></div>
1500 </li>
1501 <li>
1503 Merge branch <code>maint</code> into the current branch, but do not make
1504 a new commit automatically:
1505 </p>
1506 <div class="listingblock">
1507 <div class="content">
1508 <pre><code>$ git merge --no-commit maint</code></pre>
1509 </div></div>
1510 <div class="paragraph"><p>This can be used when you want to include further changes to the
1511 merge, or want to write your own merge commit message.</p></div>
1512 <div class="paragraph"><p>You should refrain from abusing this option to sneak substantial
1513 changes into a merge commit. Small fixups like bumping
1514 release/version name would be acceptable.</p></div>
1515 </li>
1516 </ul></div>
1517 </div>
1518 </div>
1519 <div class="sect1">
1520 <h2 id="_merge_strategies">MERGE STRATEGIES</h2>
1521 <div class="sectionbody">
1522 <div class="paragraph"><p>The merge mechanism (<code>git merge</code> and <code>git pull</code> commands) allows the
1523 backend <em>merge strategies</em> to be chosen with <code>-s</code> option. Some strategies
1524 can also take their own options, which can be passed by giving <code>-X&lt;option&gt;</code>
1525 arguments to <code>git merge</code> and/or <code>git pull</code>.</p></div>
1526 <div class="dlist"><dl>
1527 <dt class="hdlist1">
1529 </dt>
1530 <dd>
1532 This is the default merge strategy when pulling or merging one
1533 branch. This strategy can only resolve two heads using a
1534 3-way merge algorithm. When there is more than one common
1535 ancestor that can be used for 3-way merge, it creates a merged
1536 tree of the common ancestors and uses that as the reference
1537 tree for the 3-way merge. This has been reported to result in
1538 fewer merge conflicts without causing mismerges by tests done
1539 on actual merge commits taken from Linux 2.6 kernel
1540 development history. Additionally this strategy can detect
1541 and handle merges involving renames. It does not make use of
1542 detected copies. The name for this algorithm is an acronym
1543 ("Ostensibly Recursive&#8217;s Twin") and came from the fact that it
1544 was written as a replacement for the previous default
1545 algorithm, <code>recursive</code>.
1546 </p>
1547 <div class="paragraph"><p>The <em>ort</em> strategy can take the following options:</p></div>
1548 <div class="dlist"><dl>
1549 <dt class="hdlist1">
1550 ours
1551 </dt>
1552 <dd>
1554 This option forces conflicting hunks to be auto-resolved cleanly by
1555 favoring <em>our</em> version. Changes from the other tree that do not
1556 conflict with our side are reflected in the merge result.
1557 For a binary file, the entire contents are taken from our side.
1558 </p>
1559 <div class="paragraph"><p>This should not be confused with the <em>ours</em> merge strategy, which does not
1560 even look at what the other tree contains at all. It discards everything
1561 the other tree did, declaring <em>our</em> history contains all that happened in it.</p></div>
1562 </dd>
1563 <dt class="hdlist1">
1564 theirs
1565 </dt>
1566 <dd>
1568 This is the opposite of <em>ours</em>; note that, unlike <em>ours</em>, there is
1569 no <em>theirs</em> merge strategy to confuse this merge option with.
1570 </p>
1571 </dd>
1572 <dt class="hdlist1">
1573 ignore-space-change
1574 </dt>
1575 <dt class="hdlist1">
1576 ignore-all-space
1577 </dt>
1578 <dt class="hdlist1">
1579 ignore-space-at-eol
1580 </dt>
1581 <dt class="hdlist1">
1582 ignore-cr-at-eol
1583 </dt>
1584 <dd>
1586 Treats lines with the indicated type of whitespace change as
1587 unchanged for the sake of a three-way merge. Whitespace
1588 changes mixed with other changes to a line are not ignored.
1589 See also <a href="git-diff.html">git-diff(1)</a> <code>-b</code>, <code>-w</code>,
1590 <code>--ignore-space-at-eol</code>, and <code>--ignore-cr-at-eol</code>.
1591 </p>
1592 <div class="ulist"><ul>
1593 <li>
1595 If <em>their</em> version only introduces whitespace changes to a line,
1596 <em>our</em> version is used;
1597 </p>
1598 </li>
1599 <li>
1601 If <em>our</em> version introduces whitespace changes but <em>their</em>
1602 version includes a substantial change, <em>their</em> version is used;
1603 </p>
1604 </li>
1605 <li>
1607 Otherwise, the merge proceeds in the usual way.
1608 </p>
1609 </li>
1610 </ul></div>
1611 </dd>
1612 <dt class="hdlist1">
1613 renormalize
1614 </dt>
1615 <dd>
1617 This runs a virtual check-out and check-in of all three stages
1618 of a file when resolving a three-way merge. This option is
1619 meant to be used when merging branches with different clean
1620 filters or end-of-line normalization rules. See "Merging
1621 branches with differing checkin/checkout attributes" in
1622 <a href="gitattributes.html">gitattributes(5)</a> for details.
1623 </p>
1624 </dd>
1625 <dt class="hdlist1">
1626 no-renormalize
1627 </dt>
1628 <dd>
1630 Disables the <code>renormalize</code> option. This overrides the
1631 <code>merge.renormalize</code> configuration variable.
1632 </p>
1633 </dd>
1634 <dt class="hdlist1">
1635 find-renames[=&lt;n&gt;]
1636 </dt>
1637 <dd>
1639 Turn on rename detection, optionally setting the similarity
1640 threshold. This is the default. This overrides the
1641 <em>merge.renames</em> configuration variable.
1642 See also <a href="git-diff.html">git-diff(1)</a> <code>--find-renames</code>.
1643 </p>
1644 </dd>
1645 <dt class="hdlist1">
1646 rename-threshold=&lt;n&gt;
1647 </dt>
1648 <dd>
1650 Deprecated synonym for <code>find-renames=&lt;n&gt;</code>.
1651 </p>
1652 </dd>
1653 <dt class="hdlist1">
1654 subtree[=&lt;path&gt;]
1655 </dt>
1656 <dd>
1658 This option is a more advanced form of <em>subtree</em> strategy, where
1659 the strategy makes a guess on how two trees must be shifted to
1660 match with each other when merging. Instead, the specified path
1661 is prefixed (or stripped from the beginning) to make the shape of
1662 two trees to match.
1663 </p>
1664 </dd>
1665 </dl></div>
1666 </dd>
1667 <dt class="hdlist1">
1668 recursive
1669 </dt>
1670 <dd>
1672 This can only resolve two heads using a 3-way merge
1673 algorithm. When there is more than one common
1674 ancestor that can be used for 3-way merge, it creates a
1675 merged tree of the common ancestors and uses that as
1676 the reference tree for the 3-way merge. This has been
1677 reported to result in fewer merge conflicts without
1678 causing mismerges by tests done on actual merge commits
1679 taken from Linux 2.6 kernel development history.
1680 Additionally this can detect and handle merges involving
1681 renames. It does not make use of detected copies. This was
1682 the default strategy for resolving two heads from Git v0.99.9k
1683 until v2.33.0.
1684 </p>
1685 <div class="paragraph"><p>The <em>recursive</em> strategy takes the same options as <em>ort</em>. However,
1686 there are three additional options that <em>ort</em> ignores (not documented
1687 above) that are potentially useful with the <em>recursive</em> strategy:</p></div>
1688 <div class="dlist"><dl>
1689 <dt class="hdlist1">
1690 patience
1691 </dt>
1692 <dd>
1694 Deprecated synonym for <code>diff-algorithm=patience</code>.
1695 </p>
1696 </dd>
1697 <dt class="hdlist1">
1698 diff-algorithm=[patience|minimal|histogram|myers]
1699 </dt>
1700 <dd>
1702 Use a different diff algorithm while merging, which can help
1703 avoid mismerges that occur due to unimportant matching lines
1704 (such as braces from distinct functions). See also
1705 <a href="git-diff.html">git-diff(1)</a> <code>--diff-algorithm</code>. Note that <code>ort</code>
1706 specifically uses <code>diff-algorithm=histogram</code>, while <code>recursive</code>
1707 defaults to the <code>diff.algorithm</code> config setting.
1708 </p>
1709 </dd>
1710 <dt class="hdlist1">
1711 no-renames
1712 </dt>
1713 <dd>
1715 Turn off rename detection. This overrides the <code>merge.renames</code>
1716 configuration variable.
1717 See also <a href="git-diff.html">git-diff(1)</a> <code>--no-renames</code>.
1718 </p>
1719 </dd>
1720 </dl></div>
1721 </dd>
1722 <dt class="hdlist1">
1723 resolve
1724 </dt>
1725 <dd>
1727 This can only resolve two heads (i.e. the current branch
1728 and another branch you pulled from) using a 3-way merge
1729 algorithm. It tries to carefully detect criss-cross
1730 merge ambiguities. It does not handle renames.
1731 </p>
1732 </dd>
1733 <dt class="hdlist1">
1734 octopus
1735 </dt>
1736 <dd>
1738 This resolves cases with more than two heads, but refuses to do
1739 a complex merge that needs manual resolution. It is
1740 primarily meant to be used for bundling topic branch
1741 heads together. This is the default merge strategy when
1742 pulling or merging more than one branch.
1743 </p>
1744 </dd>
1745 <dt class="hdlist1">
1746 ours
1747 </dt>
1748 <dd>
1750 This resolves any number of heads, but the resulting tree of the
1751 merge is always that of the current branch head, effectively
1752 ignoring all changes from all other branches. It is meant to
1753 be used to supersede old development history of side
1754 branches. Note that this is different from the -Xours option to
1755 the <em>recursive</em> merge strategy.
1756 </p>
1757 </dd>
1758 <dt class="hdlist1">
1759 subtree
1760 </dt>
1761 <dd>
1763 This is a modified <code>ort</code> strategy. When merging trees A and
1764 B, if B corresponds to a subtree of A, B is first adjusted to
1765 match the tree structure of A, instead of reading the trees at
1766 the same level. This adjustment is also done to the common
1767 ancestor tree.
1768 </p>
1769 </dd>
1770 </dl></div>
1771 <div class="paragraph"><p>With the strategies that use 3-way merge (including the default, <em>ort</em>),
1772 if a change is made on both branches, but later reverted on one of the
1773 branches, that change will be present in the merged result; some people find
1774 this behavior confusing. It occurs because only the heads and the merge base
1775 are considered when performing a merge, not the individual commits. The merge
1776 algorithm therefore considers the reverted change as no change at all, and
1777 substitutes the changed version instead.</p></div>
1778 </div>
1779 </div>
1780 <div class="sect1">
1781 <h2 id="_configuration">CONFIGURATION</h2>
1782 <div class="sectionbody">
1783 <div class="dlist"><dl>
1784 <dt class="hdlist1">
1785 branch.&lt;name&gt;.mergeOptions
1786 </dt>
1787 <dd>
1789 Sets default options for merging into branch &lt;name&gt;. The syntax and
1790 supported options are the same as those of <em>git merge</em>, but option
1791 values containing whitespace characters are currently not supported.
1792 </p>
1793 </dd>
1794 </dl></div>
1795 <div class="paragraph"><p>Everything above this line in this section isn&#8217;t included from the
1796 <a href="git-config.html">git-config(1)</a> documentation. The content that follows is the
1797 same as what&#8217;s found there:</p></div>
1798 <div class="dlist"><dl>
1799 <dt class="hdlist1">
1800 merge.conflictStyle
1801 </dt>
1802 <dd>
1804 Specify the style in which conflicted hunks are written out to
1805 working tree files upon merge. The default is "merge", which
1806 shows a <code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</code> conflict marker, changes made by one side,
1807 a <code>=======</code> marker, changes made by the other side, and then
1808 a <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code> marker. An alternate style, "diff3", adds a <code>|||||||</code>
1809 marker and the original text before the <code>=======</code> marker. The
1810 "merge" style tends to produce smaller conflict regions than diff3,
1811 both because of the exclusion of the original text, and because
1812 when a subset of lines match on the two sides they are just pulled
1813 out of the conflict region. Another alternate style, "zdiff3", is
1814 similar to diff3 but removes matching lines on the two sides from
1815 the conflict region when those matching lines appear near either
1816 the beginning or end of a conflict region.
1817 </p>
1818 </dd>
1819 <dt class="hdlist1">
1820 merge.defaultToUpstream
1821 </dt>
1822 <dd>
1824 If merge is called without any commit argument, merge the upstream
1825 branches configured for the current branch by using their last
1826 observed values stored in their remote-tracking branches.
1827 The values of the <code>branch.&lt;current branch&gt;.merge</code> that name the
1828 branches at the remote named by <code>branch.&lt;current branch&gt;.remote</code>
1829 are consulted, and then they are mapped via <code>remote.&lt;remote&gt;.fetch</code>
1830 to their corresponding remote-tracking branches, and the tips of
1831 these tracking branches are merged. Defaults to true.
1832 </p>
1833 </dd>
1834 <dt class="hdlist1">
1835 merge.ff
1836 </dt>
1837 <dd>
1839 By default, Git does not create an extra merge commit when merging
1840 a commit that is a descendant of the current commit. Instead, the
1841 tip of the current branch is fast-forwarded. When set to <code>false</code>,
1842 this variable tells Git to create an extra merge commit in such
1843 a case (equivalent to giving the <code>--no-ff</code> option from the command
1844 line). When set to <code>only</code>, only such fast-forward merges are
1845 allowed (equivalent to giving the <code>--ff-only</code> option from the
1846 command line).
1847 </p>
1848 </dd>
1849 <dt class="hdlist1">
1850 merge.verifySignatures
1851 </dt>
1852 <dd>
1854 If true, this is equivalent to the --verify-signatures command
1855 line option. See <a href="git-merge.html">git-merge(1)</a> for details.
1856 </p>
1857 </dd>
1858 <dt class="hdlist1">
1859 merge.branchdesc
1860 </dt>
1861 <dd>
1863 In addition to branch names, populate the log message with
1864 the branch description text associated with them. Defaults
1865 to false.
1866 </p>
1867 </dd>
1868 <dt class="hdlist1">
1869 merge.log
1870 </dt>
1871 <dd>
1873 In addition to branch names, populate the log message with at
1874 most the specified number of one-line descriptions from the
1875 actual commits that are being merged. Defaults to false, and
1876 true is a synonym for 20.
1877 </p>
1878 </dd>
1879 <dt class="hdlist1">
1880 merge.suppressDest
1881 </dt>
1882 <dd>
1884 By adding a glob that matches the names of integration
1885 branches to this multi-valued configuration variable, the
1886 default merge message computed for merges into these
1887 integration branches will omit "into &lt;branch name&gt;" from
1888 its title.
1889 </p>
1890 <div class="paragraph"><p>An element with an empty value can be used to clear the list
1891 of globs accumulated from previous configuration entries.
1892 When there is no <code>merge.suppressDest</code> variable defined, the
1893 default value of <code>master</code> is used for backward compatibility.</p></div>
1894 </dd>
1895 <dt class="hdlist1">
1896 merge.renameLimit
1897 </dt>
1898 <dd>
1900 The number of files to consider in the exhaustive portion of
1901 rename detection during a merge. If not specified, defaults
1902 to the value of diff.renameLimit. If neither
1903 merge.renameLimit nor diff.renameLimit are specified,
1904 currently defaults to 7000. This setting has no effect if
1905 rename detection is turned off.
1906 </p>
1907 </dd>
1908 <dt class="hdlist1">
1909 merge.renames
1910 </dt>
1911 <dd>
1913 Whether Git detects renames. If set to "false", rename detection
1914 is disabled. If set to "true", basic rename detection is enabled.
1915 Defaults to the value of diff.renames.
1916 </p>
1917 </dd>
1918 <dt class="hdlist1">
1919 merge.directoryRenames
1920 </dt>
1921 <dd>
1923 Whether Git detects directory renames, affecting what happens at
1924 merge time to new files added to a directory on one side of
1925 history when that directory was renamed on the other side of
1926 history. If merge.directoryRenames is set to "false", directory
1927 rename detection is disabled, meaning that such new files will be
1928 left behind in the old directory. If set to "true", directory
1929 rename detection is enabled, meaning that such new files will be
1930 moved into the new directory. If set to "conflict", a conflict
1931 will be reported for such paths. If merge.renames is false,
1932 merge.directoryRenames is ignored and treated as false. Defaults
1933 to "conflict".
1934 </p>
1935 </dd>
1936 <dt class="hdlist1">
1937 merge.renormalize
1938 </dt>
1939 <dd>
1941 Tell Git that canonical representation of files in the
1942 repository has changed over time (e.g. earlier commits record
1943 text files with CRLF line endings, but recent ones use LF line
1944 endings). In such a repository, Git can convert the data
1945 recorded in commits to a canonical form before performing a
1946 merge to reduce unnecessary conflicts. For more information,
1947 see section "Merging branches with differing checkin/checkout
1948 attributes" in <a href="gitattributes.html">gitattributes(5)</a>.
1949 </p>
1950 </dd>
1951 <dt class="hdlist1">
1952 merge.stat
1953 </dt>
1954 <dd>
1956 Whether to print the diffstat between ORIG_HEAD and the merge result
1957 at the end of the merge. True by default.
1958 </p>
1959 </dd>
1960 <dt class="hdlist1">
1961 merge.autoStash
1962 </dt>
1963 <dd>
1965 When set to true, automatically create a temporary stash entry
1966 before the operation begins, and apply it after the operation
1967 ends. This means that you can run merge on a dirty worktree.
1968 However, use with care: the final stash application after a
1969 successful merge might result in non-trivial conflicts.
1970 This option can be overridden by the <code>--no-autostash</code> and
1971 <code>--autostash</code> options of <a href="git-merge.html">git-merge(1)</a>.
1972 Defaults to false.
1973 </p>
1974 </dd>
1975 <dt class="hdlist1">
1976 merge.tool
1977 </dt>
1978 <dd>
1980 Controls which merge tool is used by <a href="git-mergetool.html">git-mergetool(1)</a>.
1981 The list below shows the valid built-in values.
1982 Any other value is treated as a custom merge tool and requires
1983 that a corresponding mergetool.&lt;tool&gt;.cmd variable is defined.
1984 </p>
1985 </dd>
1986 <dt class="hdlist1">
1987 merge.guitool
1988 </dt>
1989 <dd>
1991 Controls which merge tool is used by <a href="git-mergetool.html">git-mergetool(1)</a> when the
1992 -g/--gui flag is specified. The list below shows the valid built-in values.
1993 Any other value is treated as a custom merge tool and requires that a
1994 corresponding mergetool.&lt;guitool&gt;.cmd variable is defined.
1995 </p>
1996 <div class="dlist"><dl>
1997 <dt class="hdlist1">
1998 <code>araxis</code>
1999 </dt>
2000 <dd>
2002 Use Araxis Merge (requires a graphical session)
2003 </p>
2004 </dd>
2005 <dt class="hdlist1">
2006 <code>bc</code>
2007 </dt>
2008 <dd>
2010 Use Beyond Compare (requires a graphical session)
2011 </p>
2012 </dd>
2013 <dt class="hdlist1">
2014 <code>bc3</code>
2015 </dt>
2016 <dd>
2018 Use Beyond Compare (requires a graphical session)
2019 </p>
2020 </dd>
2021 <dt class="hdlist1">
2022 <code>bc4</code>
2023 </dt>
2024 <dd>
2026 Use Beyond Compare (requires a graphical session)
2027 </p>
2028 </dd>
2029 <dt class="hdlist1">
2030 <code>codecompare</code>
2031 </dt>
2032 <dd>
2034 Use Code Compare (requires a graphical session)
2035 </p>
2036 </dd>
2037 <dt class="hdlist1">
2038 <code>deltawalker</code>
2039 </dt>
2040 <dd>
2042 Use DeltaWalker (requires a graphical session)
2043 </p>
2044 </dd>
2045 <dt class="hdlist1">
2046 <code>diffmerge</code>
2047 </dt>
2048 <dd>
2050 Use DiffMerge (requires a graphical session)
2051 </p>
2052 </dd>
2053 <dt class="hdlist1">
2054 <code>diffuse</code>
2055 </dt>
2056 <dd>
2058 Use Diffuse (requires a graphical session)
2059 </p>
2060 </dd>
2061 <dt class="hdlist1">
2062 <code>ecmerge</code>
2063 </dt>
2064 <dd>
2066 Use ECMerge (requires a graphical session)
2067 </p>
2068 </dd>
2069 <dt class="hdlist1">
2070 <code>emerge</code>
2071 </dt>
2072 <dd>
2074 Use Emacs' Emerge
2075 </p>
2076 </dd>
2077 <dt class="hdlist1">
2078 <code>examdiff</code>
2079 </dt>
2080 <dd>
2082 Use ExamDiff Pro (requires a graphical session)
2083 </p>
2084 </dd>
2085 <dt class="hdlist1">
2086 <code>guiffy</code>
2087 </dt>
2088 <dd>
2090 Use Guiffy&#8217;s Diff Tool (requires a graphical session)
2091 </p>
2092 </dd>
2093 <dt class="hdlist1">
2094 <code>gvimdiff</code>
2095 </dt>
2096 <dd>
2098 Use gVim (requires a graphical session) with a custom layout (see <code>git help mergetool</code>'s <code>BACKEND SPECIFIC HINTS</code> section)
2099 </p>
2100 </dd>
2101 <dt class="hdlist1">
2102 <code>gvimdiff1</code>
2103 </dt>
2104 <dd>
2106 Use gVim (requires a graphical session) with a 2 panes layout (LOCAL and REMOTE)
2107 </p>
2108 </dd>
2109 <dt class="hdlist1">
2110 <code>gvimdiff2</code>
2111 </dt>
2112 <dd>
2114 Use gVim (requires a graphical session) with a 3 panes layout (LOCAL, MERGED and REMOTE)
2115 </p>
2116 </dd>
2117 <dt class="hdlist1">
2118 <code>gvimdiff3</code>
2119 </dt>
2120 <dd>
2122 Use gVim (requires a graphical session) where only the MERGED file is shown
2123 </p>
2124 </dd>
2125 <dt class="hdlist1">
2126 <code>kdiff3</code>
2127 </dt>
2128 <dd>
2130 Use KDiff3 (requires a graphical session)
2131 </p>
2132 </dd>
2133 <dt class="hdlist1">
2134 <code>meld</code>
2135 </dt>
2136 <dd>
2138 Use Meld (requires a graphical session) with optional <code>auto merge</code> (see <code>git help mergetool</code>'s <code>CONFIGURATION</code> section)
2139 </p>
2140 </dd>
2141 <dt class="hdlist1">
2142 <code>nvimdiff</code>
2143 </dt>
2144 <dd>
2146 Use Neovim with a custom layout (see <code>git help mergetool</code>'s <code>BACKEND SPECIFIC HINTS</code> section)
2147 </p>
2148 </dd>
2149 <dt class="hdlist1">
2150 <code>nvimdiff1</code>
2151 </dt>
2152 <dd>
2154 Use Neovim with a 2 panes layout (LOCAL and REMOTE)
2155 </p>
2156 </dd>
2157 <dt class="hdlist1">
2158 <code>nvimdiff2</code>
2159 </dt>
2160 <dd>
2162 Use Neovim with a 3 panes layout (LOCAL, MERGED and REMOTE)
2163 </p>
2164 </dd>
2165 <dt class="hdlist1">
2166 <code>nvimdiff3</code>
2167 </dt>
2168 <dd>
2170 Use Neovim where only the MERGED file is shown
2171 </p>
2172 </dd>
2173 <dt class="hdlist1">
2174 <code>opendiff</code>
2175 </dt>
2176 <dd>
2178 Use FileMerge (requires a graphical session)
2179 </p>
2180 </dd>
2181 <dt class="hdlist1">
2182 <code>p4merge</code>
2183 </dt>
2184 <dd>
2186 Use HelixCore P4Merge (requires a graphical session)
2187 </p>
2188 </dd>
2189 <dt class="hdlist1">
2190 <code>smerge</code>
2191 </dt>
2192 <dd>
2194 Use Sublime Merge (requires a graphical session)
2195 </p>
2196 </dd>
2197 <dt class="hdlist1">
2198 <code>tkdiff</code>
2199 </dt>
2200 <dd>
2202 Use TkDiff (requires a graphical session)
2203 </p>
2204 </dd>
2205 <dt class="hdlist1">
2206 <code>tortoisemerge</code>
2207 </dt>
2208 <dd>
2210 Use TortoiseMerge (requires a graphical session)
2211 </p>
2212 </dd>
2213 <dt class="hdlist1">
2214 <code>vimdiff</code>
2215 </dt>
2216 <dd>
2218 Use Vim with a custom layout (see <code>git help mergetool</code>'s <code>BACKEND SPECIFIC HINTS</code> section)
2219 </p>
2220 </dd>
2221 <dt class="hdlist1">
2222 <code>vimdiff1</code>
2223 </dt>
2224 <dd>
2226 Use Vim with a 2 panes layout (LOCAL and REMOTE)
2227 </p>
2228 </dd>
2229 <dt class="hdlist1">
2230 <code>vimdiff2</code>
2231 </dt>
2232 <dd>
2234 Use Vim with a 3 panes layout (LOCAL, MERGED and REMOTE)
2235 </p>
2236 </dd>
2237 <dt class="hdlist1">
2238 <code>vimdiff3</code>
2239 </dt>
2240 <dd>
2242 Use Vim where only the MERGED file is shown
2243 </p>
2244 </dd>
2245 <dt class="hdlist1">
2246 <code>winmerge</code>
2247 </dt>
2248 <dd>
2250 Use WinMerge (requires a graphical session)
2251 </p>
2252 </dd>
2253 <dt class="hdlist1">
2254 <code>xxdiff</code>
2255 </dt>
2256 <dd>
2258 Use xxdiff (requires a graphical session)
2259 </p>
2260 </dd>
2261 </dl></div>
2262 </dd>
2263 <dt class="hdlist1">
2264 merge.verbosity
2265 </dt>
2266 <dd>
2268 Controls the amount of output shown by the recursive merge
2269 strategy. Level 0 outputs nothing except a final error
2270 message if conflicts were detected. Level 1 outputs only
2271 conflicts, 2 outputs conflicts and file changes. Level 5 and
2272 above outputs debugging information. The default is level 2.
2273 Can be overridden by the <code>GIT_MERGE_VERBOSITY</code> environment variable.
2274 </p>
2275 </dd>
2276 <dt class="hdlist1">
2277 merge.&lt;driver&gt;.name
2278 </dt>
2279 <dd>
2281 Defines a human-readable name for a custom low-level
2282 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.
2283 </p>
2284 </dd>
2285 <dt class="hdlist1">
2286 merge.&lt;driver&gt;.driver
2287 </dt>
2288 <dd>
2290 Defines the command that implements a custom low-level
2291 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.
2292 </p>
2293 </dd>
2294 <dt class="hdlist1">
2295 merge.&lt;driver&gt;.recursive
2296 </dt>
2297 <dd>
2299 Names a low-level merge driver to be used when
2300 performing an internal merge between common ancestors.
2301 See <a href="gitattributes.html">gitattributes(5)</a> for details.
2302 </p>
2303 </dd>
2304 </dl></div>
2305 </div>
2306 </div>
2307 <div class="sect1">
2308 <h2 id="_see_also">SEE ALSO</h2>
2309 <div class="sectionbody">
2310 <div class="paragraph"><p><a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>, <a href="git-pull.html">git-pull(1)</a>,
2311 <a href="gitattributes.html">gitattributes(5)</a>,
2312 <a href="git-reset.html">git-reset(1)</a>,
2313 <a href="git-diff.html">git-diff(1)</a>, <a href="git-ls-files.html">git-ls-files(1)</a>,
2314 <a href="git-add.html">git-add(1)</a>, <a href="git-rm.html">git-rm(1)</a>,
2315 <a href="git-mergetool.html">git-mergetool(1)</a></p></div>
2316 </div>
2317 </div>
2318 <div class="sect1">
2319 <h2 id="_git">GIT</h2>
2320 <div class="sectionbody">
2321 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
2322 </div>
2323 </div>
2324 </div>
2325 <div id="footnotes"><hr /></div>
2326 <div id="footer">
2327 <div id="footer-text">
2328 Last updated
2329 2022-09-15 05:23:11 JST
2330 </div>
2331 </div>
2332 </body>
2333 </html>