Autogenerated HTML docs for v2.43.0-254-ga260
[git-htmldocs.git] / git-merge.html
blob79cade40e10af7650fd450e544d749c6d6c80f89
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. Before the operation,
783 <code>ORIG_HEAD</code> is set to the tip of the current branch (<code>C</code>).</p></div>
784 <div class="listingblock">
785 <div class="content">
786 <pre><code> A---B---C topic
788 D---E---F---G---H master</code></pre>
789 </div></div>
790 <div class="paragraph"><p>The second syntax ("<code>git merge --abort</code>") can only be run after the
791 merge has resulted in conflicts. <em>git merge --abort</em> will abort the
792 merge process and try to reconstruct the pre-merge state. However,
793 if there were uncommitted changes when the merge started (and
794 especially if those changes were further modified after the merge
795 was started), <em>git merge --abort</em> will in some cases be unable to
796 reconstruct the original (pre-merge) changes. Therefore:</p></div>
797 <div class="paragraph"><p><strong>Warning</strong>: Running <em>git merge</em> with non-trivial uncommitted changes is
798 discouraged: while possible, it may leave you in a state that is hard to
799 back out of in the case of a conflict.</p></div>
800 <div class="paragraph"><p>The third syntax ("<code>git merge --continue</code>") can only be run after the
801 merge has resulted in conflicts.</p></div>
802 </div>
803 </div>
804 <div class="sect1">
805 <h2 id="_options">OPTIONS</h2>
806 <div class="sectionbody">
807 <div class="dlist"><dl>
808 <dt class="hdlist1">
809 --commit
810 </dt>
811 <dt class="hdlist1">
812 --no-commit
813 </dt>
814 <dd>
816 Perform the merge and commit the result. This option can
817 be used to override --no-commit.
818 </p>
819 <div class="paragraph"><p>With --no-commit perform the merge and stop just before creating
820 a merge commit, to give the user a chance to inspect and further
821 tweak the merge result before committing.</p></div>
822 <div class="paragraph"><p>Note that fast-forward updates do not create a merge commit and
823 therefore there is no way to stop those merges with --no-commit.
824 Thus, if you want to ensure your branch is not changed or updated
825 by the merge command, use --no-ff with --no-commit.</p></div>
826 </dd>
827 <dt class="hdlist1">
828 --edit
829 </dt>
830 <dt class="hdlist1">
832 </dt>
833 <dt class="hdlist1">
834 --no-edit
835 </dt>
836 <dd>
838 Invoke an editor before committing successful mechanical merge to
839 further edit the auto-generated merge message, so that the user
840 can explain and justify the merge. The <code>--no-edit</code> option can be
841 used to accept the auto-generated message (this is generally
842 discouraged).
843 The <code>--edit</code> (or <code>-e</code>) option is still useful if you are
844 giving a draft message with the <code>-m</code> option from the command line
845 and want to edit it in the editor.
846 </p>
847 <div class="paragraph"><p>Older scripts may depend on the historical behaviour of not allowing the
848 user to edit the merge log message. They will see an editor opened when
849 they run <code>git merge</code>. To make it easier to adjust such scripts to the
850 updated behaviour, the environment variable <code>GIT_MERGE_AUTOEDIT</code> can be
851 set to <code>no</code> at the beginning of them.</p></div>
852 </dd>
853 <dt class="hdlist1">
854 --cleanup=&lt;mode&gt;
855 </dt>
856 <dd>
858 This option determines how the merge message will be cleaned up before
859 committing. See <a href="git-commit.html">git-commit(1)</a> for more details. In addition, if
860 the <em>&lt;mode&gt;</em> is given a value of <code>scissors</code>, scissors will be appended
861 to <code>MERGE_MSG</code> before being passed on to the commit machinery in the
862 case of a merge conflict.
863 </p>
864 </dd>
865 <dt class="hdlist1">
866 --ff
867 </dt>
868 <dt class="hdlist1">
869 --no-ff
870 </dt>
871 <dt class="hdlist1">
872 --ff-only
873 </dt>
874 <dd>
876 Specifies how a merge is handled when the merged-in history is
877 already a descendant of the current history. <code>--ff</code> is the
878 default unless merging an annotated (and possibly signed) tag
879 that is not stored in its natural place in the <code>refs/tags/</code>
880 hierarchy, in which case <code>--no-ff</code> is assumed.
881 </p>
882 <div class="paragraph"><p>With <code>--ff</code>, when possible resolve the merge as a fast-forward (only
883 update the branch pointer to match the merged branch; do not create a
884 merge commit). When not possible (when the merged-in history is not a
885 descendant of the current history), create a merge commit.</p></div>
886 <div class="paragraph"><p>With <code>--no-ff</code>, create a merge commit in all cases, even when the merge
887 could instead be resolved as a fast-forward.</p></div>
888 <div class="paragraph"><p>With <code>--ff-only</code>, resolve the merge as a fast-forward when possible.
889 When not possible, refuse to merge and exit with a non-zero status.</p></div>
890 </dd>
891 <dt class="hdlist1">
892 -S[&lt;keyid&gt;]
893 </dt>
894 <dt class="hdlist1">
895 --gpg-sign[=&lt;keyid&gt;]
896 </dt>
897 <dt class="hdlist1">
898 --no-gpg-sign
899 </dt>
900 <dd>
902 GPG-sign the resulting merge commit. The <code>keyid</code> argument is
903 optional and defaults to the committer identity; if specified,
904 it must be stuck to the option without a space. <code>--no-gpg-sign</code>
905 is useful to countermand both <code>commit.gpgSign</code> configuration variable,
906 and earlier <code>--gpg-sign</code>.
907 </p>
908 </dd>
909 <dt class="hdlist1">
910 --log[=&lt;n&gt;]
911 </dt>
912 <dt class="hdlist1">
913 --no-log
914 </dt>
915 <dd>
917 In addition to branch names, populate the log message with
918 one-line descriptions from at most &lt;n&gt; actual commits that are being
919 merged. See also <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>.
920 </p>
921 <div class="paragraph"><p>With --no-log do not list one-line descriptions from the
922 actual commits being merged.</p></div>
923 </dd>
924 <dt class="hdlist1">
925 --signoff
926 </dt>
927 <dt class="hdlist1">
928 --no-signoff
929 </dt>
930 <dd>
932 Add a <code>Signed-off-by</code> trailer by the committer at the end of the commit
933 log message. The meaning of a signoff depends on the project
934 to which you&#8217;re committing. For example, it may certify that
935 the committer has the rights to submit the work under the
936 project&#8217;s license or agrees to some contributor representation,
937 such as a Developer Certificate of Origin.
938 (See <a href="https://developercertificate.org">https://developercertificate.org</a> for the one used by the
939 Linux kernel and Git projects.) Consult the documentation or
940 leadership of the project to which you&#8217;re contributing to
941 understand how the signoffs are used in that project.
942 </p>
943 <div class="paragraph"><p>The --no-signoff option can be used to countermand an earlier --signoff
944 option on the command line.</p></div>
945 </dd>
946 <dt class="hdlist1">
947 --stat
948 </dt>
949 <dt class="hdlist1">
951 </dt>
952 <dt class="hdlist1">
953 --no-stat
954 </dt>
955 <dd>
957 Show a diffstat at the end of the merge. The diffstat is also
958 controlled by the configuration option merge.stat.
959 </p>
960 <div class="paragraph"><p>With -n or --no-stat do not show a diffstat at the end of the
961 merge.</p></div>
962 </dd>
963 <dt class="hdlist1">
964 --squash
965 </dt>
966 <dt class="hdlist1">
967 --no-squash
968 </dt>
969 <dd>
971 Produce the working tree and index state as if a real merge
972 happened (except for the merge information), but do not actually
973 make a commit, move the <code>HEAD</code>, or record <code>$GIT_DIR/MERGE_HEAD</code>
974 (to cause the next <code>git commit</code> command to create a merge
975 commit). This allows you to create a single commit on top of
976 the current branch whose effect is the same as merging another
977 branch (or more in case of an octopus).
978 </p>
979 <div class="paragraph"><p>With --no-squash perform the merge and commit the result. This
980 option can be used to override --squash.</p></div>
981 <div class="paragraph"><p>With --squash, --commit is not allowed, and will fail.</p></div>
982 </dd>
983 <dt class="hdlist1">
984 --[no-]verify
985 </dt>
986 <dd>
988 By default, the pre-merge and commit-msg hooks are run.
989 When <code>--no-verify</code> is given, these are bypassed.
990 See also <a href="githooks.html">githooks(5)</a>.
991 </p>
992 </dd>
993 <dt class="hdlist1">
994 -s &lt;strategy&gt;
995 </dt>
996 <dt class="hdlist1">
997 --strategy=&lt;strategy&gt;
998 </dt>
999 <dd>
1001 Use the given merge strategy; can be supplied more than
1002 once to specify them in the order they should be tried.
1003 If there is no <code>-s</code> option, a built-in list of strategies
1004 is used instead (<code>ort</code> when merging a single head,
1005 <code>octopus</code> otherwise).
1006 </p>
1007 </dd>
1008 <dt class="hdlist1">
1009 -X &lt;option&gt;
1010 </dt>
1011 <dt class="hdlist1">
1012 --strategy-option=&lt;option&gt;
1013 </dt>
1014 <dd>
1016 Pass merge strategy specific option through to the merge
1017 strategy.
1018 </p>
1019 </dd>
1020 <dt class="hdlist1">
1021 --verify-signatures
1022 </dt>
1023 <dt class="hdlist1">
1024 --no-verify-signatures
1025 </dt>
1026 <dd>
1028 Verify that the tip commit of the side branch being merged is
1029 signed with a valid key, i.e. a key that has a valid uid: in the
1030 default trust model, this means the signing key has been signed by
1031 a trusted key. If the tip commit of the side branch is not signed
1032 with a valid key, the merge is aborted.
1033 </p>
1034 </dd>
1035 <dt class="hdlist1">
1036 --summary
1037 </dt>
1038 <dt class="hdlist1">
1039 --no-summary
1040 </dt>
1041 <dd>
1043 Synonyms to --stat and --no-stat; these are deprecated and will be
1044 removed in the future.
1045 </p>
1046 </dd>
1047 <dt class="hdlist1">
1049 </dt>
1050 <dt class="hdlist1">
1051 --quiet
1052 </dt>
1053 <dd>
1055 Operate quietly. Implies --no-progress.
1056 </p>
1057 </dd>
1058 <dt class="hdlist1">
1060 </dt>
1061 <dt class="hdlist1">
1062 --verbose
1063 </dt>
1064 <dd>
1066 Be verbose.
1067 </p>
1068 </dd>
1069 <dt class="hdlist1">
1070 --progress
1071 </dt>
1072 <dt class="hdlist1">
1073 --no-progress
1074 </dt>
1075 <dd>
1077 Turn progress on/off explicitly. If neither is specified,
1078 progress is shown if standard error is connected to a terminal.
1079 Note that not all merge strategies may support progress
1080 reporting.
1081 </p>
1082 </dd>
1083 <dt class="hdlist1">
1084 --autostash
1085 </dt>
1086 <dt class="hdlist1">
1087 --no-autostash
1088 </dt>
1089 <dd>
1091 Automatically create a temporary stash entry before the operation
1092 begins, record it in the ref <code>MERGE_AUTOSTASH</code>
1093 and apply it after the operation ends. This means
1094 that you can run the operation on a dirty worktree. However, use
1095 with care: the final stash application after a successful
1096 merge might result in non-trivial conflicts.
1097 </p>
1098 </dd>
1099 <dt class="hdlist1">
1100 --allow-unrelated-histories
1101 </dt>
1102 <dd>
1104 By default, <code>git merge</code> command refuses to merge histories
1105 that do not share a common ancestor. This option can be
1106 used to override this safety when merging histories of two
1107 projects that started their lives independently. As that is
1108 a very rare occasion, no configuration variable to enable
1109 this by default exists and will not be added.
1110 </p>
1111 </dd>
1112 <dt class="hdlist1">
1113 -m &lt;msg&gt;
1114 </dt>
1115 <dd>
1117 Set the commit message to be used for the merge commit (in
1118 case one is created).
1119 </p>
1120 <div class="paragraph"><p>If <code>--log</code> is specified, a shortlog of the commits being merged
1121 will be appended to the specified message.</p></div>
1122 <div class="paragraph"><p>The <em>git fmt-merge-msg</em> command can be
1123 used to give a good default for automated <em>git merge</em>
1124 invocations. The automated message can include the branch description.</p></div>
1125 </dd>
1126 <dt class="hdlist1">
1127 --into-name &lt;branch&gt;
1128 </dt>
1129 <dd>
1131 Prepare the default merge message as if merging to the branch
1132 <code>&lt;branch&gt;</code>, instead of the name of the real branch to which
1133 the merge is made.
1134 </p>
1135 </dd>
1136 <dt class="hdlist1">
1137 -F &lt;file&gt;
1138 </dt>
1139 <dt class="hdlist1">
1140 --file=&lt;file&gt;
1141 </dt>
1142 <dd>
1144 Read the commit message to be used for the merge commit (in
1145 case one is created).
1146 </p>
1147 <div class="paragraph"><p>If <code>--log</code> is specified, a shortlog of the commits being merged
1148 will be appended to the specified message.</p></div>
1149 </dd>
1150 <dt class="hdlist1">
1151 --rerere-autoupdate
1152 </dt>
1153 <dt class="hdlist1">
1154 --no-rerere-autoupdate
1155 </dt>
1156 <dd>
1158 After the rerere mechanism reuses a recorded resolution on
1159 the current conflict to update the files in the working
1160 tree, allow it to also update the index with the result of
1161 resolution. <code>--no-rerere-autoupdate</code> is a good way to
1162 double-check what <code>rerere</code> did and catch potential
1163 mismerges, before committing the result to the index with a
1164 separate <code>git add</code>.
1165 </p>
1166 </dd>
1167 <dt class="hdlist1">
1168 --overwrite-ignore
1169 </dt>
1170 <dt class="hdlist1">
1171 --no-overwrite-ignore
1172 </dt>
1173 <dd>
1175 Silently overwrite ignored files from the merge result. This
1176 is the default behavior. Use <code>--no-overwrite-ignore</code> to abort.
1177 </p>
1178 </dd>
1179 <dt class="hdlist1">
1180 --abort
1181 </dt>
1182 <dd>
1184 Abort the current conflict resolution process, and
1185 try to reconstruct the pre-merge state. If an autostash entry is
1186 present, apply it to the worktree.
1187 </p>
1188 <div class="paragraph"><p>If there were uncommitted worktree changes present when the merge
1189 started, <em>git merge --abort</em> will in some cases be unable to
1190 reconstruct these changes. It is therefore recommended to always
1191 commit or stash your changes before running <em>git merge</em>.</p></div>
1192 <div class="paragraph"><p><em>git merge --abort</em> is equivalent to <em>git reset --merge</em> when
1193 <code>MERGE_HEAD</code> is present unless <code>MERGE_AUTOSTASH</code> is also present in
1194 which case <em>git merge --abort</em> applies the stash entry to the worktree
1195 whereas <em>git reset --merge</em> will save the stashed changes in the stash
1196 list.</p></div>
1197 </dd>
1198 <dt class="hdlist1">
1199 --quit
1200 </dt>
1201 <dd>
1203 Forget about the current merge in progress. Leave the index
1204 and the working tree as-is. If <code>MERGE_AUTOSTASH</code> is present, the
1205 stash entry will be saved to the stash list.
1206 </p>
1207 </dd>
1208 <dt class="hdlist1">
1209 --continue
1210 </dt>
1211 <dd>
1213 After a <em>git merge</em> stops due to conflicts you can conclude the
1214 merge by running <em>git merge --continue</em> (see "HOW TO RESOLVE
1215 CONFLICTS" section below).
1216 </p>
1217 </dd>
1218 <dt class="hdlist1">
1219 &lt;commit&gt;&#8230;
1220 </dt>
1221 <dd>
1223 Commits, usually other branch heads, to merge into our branch.
1224 Specifying more than one commit will create a merge with
1225 more than two parents (affectionately called an Octopus merge).
1226 </p>
1227 <div class="paragraph"><p>If no commit is given from the command line, merge the remote-tracking
1228 branches that the current branch is configured to use as its upstream.
1229 See also the configuration section of this manual page.</p></div>
1230 <div class="paragraph"><p>When <code>FETCH_HEAD</code> (and no other commit) is specified, the branches
1231 recorded in the <code>.git/FETCH_HEAD</code> file by the previous invocation
1232 of <code>git fetch</code> for merging are merged to the current branch.</p></div>
1233 </dd>
1234 </dl></div>
1235 </div>
1236 </div>
1237 <div class="sect1">
1238 <h2 id="_pre_merge_checks">PRE-MERGE CHECKS</h2>
1239 <div class="sectionbody">
1240 <div class="paragraph"><p>Before applying outside changes, you should get your own work in
1241 good shape and committed locally, so it will not be clobbered if
1242 there are conflicts. See also <a href="git-stash.html">git-stash(1)</a>.
1243 <em>git pull</em> and <em>git merge</em> will stop without doing anything when
1244 local uncommitted changes overlap with files that <em>git pull</em>/<em>git
1245 merge</em> may need to update.</p></div>
1246 <div class="paragraph"><p>To avoid recording unrelated changes in the merge commit,
1247 <em>git pull</em> and <em>git merge</em> will also abort if there are any changes
1248 registered in the index relative to the <code>HEAD</code> commit. (Special
1249 narrow exceptions to this rule may exist depending on which merge
1250 strategy is in use, but generally, the index must match HEAD.)</p></div>
1251 <div class="paragraph"><p>If all named commits are already ancestors of <code>HEAD</code>, <em>git merge</em>
1252 will exit early with the message "Already up to date."</p></div>
1253 </div>
1254 </div>
1255 <div class="sect1">
1256 <h2 id="_fast_forward_merge">FAST-FORWARD MERGE</h2>
1257 <div class="sectionbody">
1258 <div class="paragraph"><p>Often the current branch head is an ancestor of the named commit.
1259 This is the most common case especially when invoked from <em>git
1260 pull</em>: you are tracking an upstream repository, you have committed
1261 no local changes, and now you want to update to a newer upstream
1262 revision. In this case, a new commit is not needed to store the
1263 combined history; instead, the <code>HEAD</code> (along with the index) is
1264 updated to point at the named commit, without creating an extra
1265 merge commit.</p></div>
1266 <div class="paragraph"><p>This behavior can be suppressed with the <code>--no-ff</code> option.</p></div>
1267 </div>
1268 </div>
1269 <div class="sect1">
1270 <h2 id="_true_merge">TRUE MERGE</h2>
1271 <div class="sectionbody">
1272 <div class="paragraph"><p>Except in a fast-forward merge (see above), the branches to be
1273 merged must be tied together by a merge commit that has both of them
1274 as its parents.</p></div>
1275 <div class="paragraph"><p>A merged version reconciling the changes from all branches to be
1276 merged is committed, and your <code>HEAD</code>, index, and working tree are
1277 updated to it. It is possible to have modifications in the working
1278 tree as long as they do not overlap; the update will preserve them.</p></div>
1279 <div class="paragraph"><p>When it is not obvious how to reconcile the changes, the following
1280 happens:</p></div>
1281 <div class="olist arabic"><ol class="arabic">
1282 <li>
1284 The <code>HEAD</code> pointer stays the same.
1285 </p>
1286 </li>
1287 <li>
1289 The <code>MERGE_HEAD</code> ref is set to point to the other branch head.
1290 </p>
1291 </li>
1292 <li>
1294 Paths that merged cleanly are updated both in the index file and
1295 in your working tree.
1296 </p>
1297 </li>
1298 <li>
1300 For conflicting paths, the index file records up to three
1301 versions: stage 1 stores the version from the common ancestor,
1302 stage 2 from <code>HEAD</code>, and stage 3 from <code>MERGE_HEAD</code> (you
1303 can inspect the stages with <code>git ls-files -u</code>). The working
1304 tree files contain the result of the merge operation; i.e. 3-way
1305 merge results with familiar conflict markers <code>&lt;&lt;&lt;</code> <code>===</code> <code>&gt;&gt;&gt;</code>.
1306 </p>
1307 </li>
1308 <li>
1310 A ref named <code>AUTO_MERGE</code> is written, pointing to a tree
1311 corresponding to the current content of the working tree (including
1312 conflict markers for textual conflicts). Note that this ref is only
1313 written when the <em>ort</em> merge strategy is used (the default).
1314 </p>
1315 </li>
1316 <li>
1318 No other changes are made. In particular, the local
1319 modifications you had before you started merge will stay the
1320 same and the index entries for them stay as they were,
1321 i.e. matching <code>HEAD</code>.
1322 </p>
1323 </li>
1324 </ol></div>
1325 <div class="paragraph"><p>If you tried a merge which resulted in complex conflicts and
1326 want to start over, you can recover with <code>git merge --abort</code>.</p></div>
1327 </div>
1328 </div>
1329 <div class="sect1">
1330 <h2 id="_merging_tag">MERGING TAG</h2>
1331 <div class="sectionbody">
1332 <div class="paragraph"><p>When merging an annotated (and possibly signed) tag, Git always
1333 creates a merge commit even if a fast-forward merge is possible, and
1334 the commit message template is prepared with the tag message.
1335 Additionally, if the tag is signed, the signature check is reported
1336 as a comment in the message template. See also <a href="git-tag.html">git-tag(1)</a>.</p></div>
1337 <div class="paragraph"><p>When you want to just integrate with the work leading to the commit
1338 that happens to be tagged, e.g. synchronizing with an upstream
1339 release point, you may not want to make an unnecessary merge commit.</p></div>
1340 <div class="paragraph"><p>In such a case, you can "unwrap" the tag yourself before feeding it
1341 to <code>git merge</code>, or pass <code>--ff-only</code> when you do not have any work on
1342 your own. e.g.</p></div>
1343 <div class="listingblock">
1344 <div class="content">
1345 <pre><code>git fetch origin
1346 git merge v1.2.3^0
1347 git merge --ff-only v1.2.3</code></pre>
1348 </div></div>
1349 </div>
1350 </div>
1351 <div class="sect1">
1352 <h2 id="_how_conflicts_are_presented">HOW CONFLICTS ARE PRESENTED</h2>
1353 <div class="sectionbody">
1354 <div class="paragraph"><p>During a merge, the working tree files are updated to reflect the result
1355 of the merge. Among the changes made to the common ancestor&#8217;s version,
1356 non-overlapping ones (that is, you changed an area of the file while the
1357 other side left that area intact, or vice versa) are incorporated in the
1358 final result verbatim. When both sides made changes to the same area,
1359 however, Git cannot randomly pick one side over the other, and asks you to
1360 resolve it by leaving what both sides did to that area.</p></div>
1361 <div class="paragraph"><p>By default, Git uses the same style as the one used by the "merge" program
1362 from the RCS suite to present such a conflicted hunk, like this:</p></div>
1363 <div class="listingblock">
1364 <div class="content">
1365 <pre><code>Here are lines that are either unchanged from the common
1366 ancestor, or cleanly resolved because only one side changed,
1367 or cleanly resolved because both sides changed the same way.
1368 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1369 Conflict resolution is hard;
1370 let's go shopping.
1371 =======
1372 Git makes conflict resolution easy.
1373 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1374 And here is another line that is cleanly resolved or unmodified.</code></pre>
1375 </div></div>
1376 <div class="paragraph"><p>The area where a pair of conflicting changes happened is marked with markers
1377 <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>
1378 is typically your side, and the part afterwards is typically their side.</p></div>
1379 <div class="paragraph"><p>The default format does not show what the original said in the conflicting
1380 area. You cannot tell how many lines are deleted and replaced with
1381 Barbie&#8217;s remark on your side. The only thing you can tell is that your
1382 side wants to say it is hard and you&#8217;d prefer to go shopping, while the
1383 other side wants to claim it is easy.</p></div>
1384 <div class="paragraph"><p>An alternative style can be used by setting the "merge.conflictStyle"
1385 configuration variable to either "diff3" or "zdiff3". In "diff3"
1386 style, the above conflict may look like this:</p></div>
1387 <div class="listingblock">
1388 <div class="content">
1389 <pre><code>Here are lines that are either unchanged from the common
1390 ancestor, or cleanly resolved because only one side changed,
1391 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1392 or cleanly resolved because both sides changed the same way.
1393 Conflict resolution is hard;
1394 let's go shopping.
1395 ||||||| base:sample.txt
1396 or cleanly resolved because both sides changed identically.
1397 Conflict resolution is hard.
1398 =======
1399 or cleanly resolved because both sides changed the same way.
1400 Git makes conflict resolution easy.
1401 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1402 And here is another line that is cleanly resolved or unmodified.</code></pre>
1403 </div></div>
1404 <div class="paragraph"><p>while in "zdiff3" style, it may look like this:</p></div>
1405 <div class="listingblock">
1406 <div class="content">
1407 <pre><code>Here are lines that are either unchanged from the common
1408 ancestor, or cleanly resolved because only one side changed,
1409 or cleanly resolved because both sides changed the same way.
1410 &lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1411 Conflict resolution is hard;
1412 let's go shopping.
1413 ||||||| base:sample.txt
1414 or cleanly resolved because both sides changed identically.
1415 Conflict resolution is hard.
1416 =======
1417 Git makes conflict resolution easy.
1418 &gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
1419 And here is another line that is cleanly resolved or unmodified.</code></pre>
1420 </div></div>
1421 <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
1422 another <code>|||||||</code> marker that is followed by the original text. You can
1423 tell that the original just stated a fact, and your side simply gave in to
1424 that statement and gave up, while the other side tried to have a more
1425 positive attitude. You can sometimes come up with a better resolution by
1426 viewing the original.</p></div>
1427 </div>
1428 </div>
1429 <div class="sect1">
1430 <h2 id="_how_to_resolve_conflicts">HOW TO RESOLVE CONFLICTS</h2>
1431 <div class="sectionbody">
1432 <div class="paragraph"><p>After seeing a conflict, you can do two things:</p></div>
1433 <div class="ulist"><ul>
1434 <li>
1436 Decide not to merge. The only clean-ups you need are to reset
1437 the index file to the <code>HEAD</code> commit to reverse 2. and to clean
1438 up working tree changes made by 2. and 3.; <code>git merge --abort</code>
1439 can be used for this.
1440 </p>
1441 </li>
1442 <li>
1444 Resolve the conflicts. Git will mark the conflicts in
1445 the working tree. Edit the files into shape and
1446 <em>git add</em> them to the index. Use <em>git commit</em> or
1447 <em>git merge --continue</em> to seal the deal. The latter command
1448 checks whether there is a (interrupted) merge in progress
1449 before calling <em>git commit</em>.
1450 </p>
1451 </li>
1452 </ul></div>
1453 <div class="paragraph"><p>You can work through the conflict with a number of tools:</p></div>
1454 <div class="ulist"><ul>
1455 <li>
1457 Use a mergetool. <code>git mergetool</code> to launch a graphical
1458 mergetool which will work through the merge with you.
1459 </p>
1460 </li>
1461 <li>
1463 Look at the diffs. <code>git diff</code> will show a three-way diff,
1464 highlighting changes from both the <code>HEAD</code> and <code>MERGE_HEAD</code>
1465 versions. <code>git diff AUTO_MERGE</code> will show what changes you&#8217;ve
1466 made so far to resolve textual conflicts.
1467 </p>
1468 </li>
1469 <li>
1471 Look at the diffs from each branch. <code>git log --merge -p &lt;path&gt;</code>
1472 will show diffs first for the <code>HEAD</code> version and then the
1473 <code>MERGE_HEAD</code> version.
1474 </p>
1475 </li>
1476 <li>
1478 Look at the originals. <code>git show :1:filename</code> shows the
1479 common ancestor, <code>git show :2:filename</code> shows the <code>HEAD</code>
1480 version, and <code>git show :3:filename</code> shows the <code>MERGE_HEAD</code>
1481 version.
1482 </p>
1483 </li>
1484 </ul></div>
1485 </div>
1486 </div>
1487 <div class="sect1">
1488 <h2 id="_examples">EXAMPLES</h2>
1489 <div class="sectionbody">
1490 <div class="ulist"><ul>
1491 <li>
1493 Merge branches <code>fixes</code> and <code>enhancements</code> on top of
1494 the current branch, making an octopus merge:
1495 </p>
1496 <div class="listingblock">
1497 <div class="content">
1498 <pre><code>$ git merge fixes enhancements</code></pre>
1499 </div></div>
1500 </li>
1501 <li>
1503 Merge branch <code>obsolete</code> into the current branch, using <code>ours</code>
1504 merge strategy:
1505 </p>
1506 <div class="listingblock">
1507 <div class="content">
1508 <pre><code>$ git merge -s ours obsolete</code></pre>
1509 </div></div>
1510 </li>
1511 <li>
1513 Merge branch <code>maint</code> into the current branch, but do not make
1514 a new commit automatically:
1515 </p>
1516 <div class="listingblock">
1517 <div class="content">
1518 <pre><code>$ git merge --no-commit maint</code></pre>
1519 </div></div>
1520 <div class="paragraph"><p>This can be used when you want to include further changes to the
1521 merge, or want to write your own merge commit message.</p></div>
1522 <div class="paragraph"><p>You should refrain from abusing this option to sneak substantial
1523 changes into a merge commit. Small fixups like bumping
1524 release/version name would be acceptable.</p></div>
1525 </li>
1526 </ul></div>
1527 </div>
1528 </div>
1529 <div class="sect1">
1530 <h2 id="_merge_strategies">MERGE STRATEGIES</h2>
1531 <div class="sectionbody">
1532 <div class="paragraph"><p>The merge mechanism (<code>git merge</code> and <code>git pull</code> commands) allows the
1533 backend <em>merge strategies</em> to be chosen with <code>-s</code> option. Some strategies
1534 can also take their own options, which can be passed by giving <code>-X&lt;option&gt;</code>
1535 arguments to <code>git merge</code> and/or <code>git pull</code>.</p></div>
1536 <div class="dlist"><dl>
1537 <dt class="hdlist1">
1539 </dt>
1540 <dd>
1542 This is the default merge strategy when pulling or merging one
1543 branch. This strategy can only resolve two heads using a
1544 3-way merge algorithm. When there is more than one common
1545 ancestor that can be used for 3-way merge, it creates a merged
1546 tree of the common ancestors and uses that as the reference
1547 tree for the 3-way merge. This has been reported to result in
1548 fewer merge conflicts without causing mismerges by tests done
1549 on actual merge commits taken from Linux 2.6 kernel
1550 development history. Additionally this strategy can detect
1551 and handle merges involving renames. It does not make use of
1552 detected copies. The name for this algorithm is an acronym
1553 ("Ostensibly Recursive&#8217;s Twin") and came from the fact that it
1554 was written as a replacement for the previous default
1555 algorithm, <code>recursive</code>.
1556 </p>
1557 <div class="paragraph"><p>The <em>ort</em> strategy can take the following options:</p></div>
1558 <div class="dlist"><dl>
1559 <dt class="hdlist1">
1560 ours
1561 </dt>
1562 <dd>
1564 This option forces conflicting hunks to be auto-resolved cleanly by
1565 favoring <em>our</em> version. Changes from the other tree that do not
1566 conflict with our side are reflected in the merge result.
1567 For a binary file, the entire contents are taken from our side.
1568 </p>
1569 <div class="paragraph"><p>This should not be confused with the <em>ours</em> merge strategy, which does not
1570 even look at what the other tree contains at all. It discards everything
1571 the other tree did, declaring <em>our</em> history contains all that happened in it.</p></div>
1572 </dd>
1573 <dt class="hdlist1">
1574 theirs
1575 </dt>
1576 <dd>
1578 This is the opposite of <em>ours</em>; note that, unlike <em>ours</em>, there is
1579 no <em>theirs</em> merge strategy to confuse this merge option with.
1580 </p>
1581 </dd>
1582 <dt class="hdlist1">
1583 ignore-space-change
1584 </dt>
1585 <dt class="hdlist1">
1586 ignore-all-space
1587 </dt>
1588 <dt class="hdlist1">
1589 ignore-space-at-eol
1590 </dt>
1591 <dt class="hdlist1">
1592 ignore-cr-at-eol
1593 </dt>
1594 <dd>
1596 Treats lines with the indicated type of whitespace change as
1597 unchanged for the sake of a three-way merge. Whitespace
1598 changes mixed with other changes to a line are not ignored.
1599 See also <a href="git-diff.html">git-diff(1)</a> <code>-b</code>, <code>-w</code>,
1600 <code>--ignore-space-at-eol</code>, and <code>--ignore-cr-at-eol</code>.
1601 </p>
1602 <div class="ulist"><ul>
1603 <li>
1605 If <em>their</em> version only introduces whitespace changes to a line,
1606 <em>our</em> version is used;
1607 </p>
1608 </li>
1609 <li>
1611 If <em>our</em> version introduces whitespace changes but <em>their</em>
1612 version includes a substantial change, <em>their</em> version is used;
1613 </p>
1614 </li>
1615 <li>
1617 Otherwise, the merge proceeds in the usual way.
1618 </p>
1619 </li>
1620 </ul></div>
1621 </dd>
1622 <dt class="hdlist1">
1623 renormalize
1624 </dt>
1625 <dd>
1627 This runs a virtual check-out and check-in of all three stages
1628 of a file when resolving a three-way merge. This option is
1629 meant to be used when merging branches with different clean
1630 filters or end-of-line normalization rules. See "Merging
1631 branches with differing checkin/checkout attributes" in
1632 <a href="gitattributes.html">gitattributes(5)</a> for details.
1633 </p>
1634 </dd>
1635 <dt class="hdlist1">
1636 no-renormalize
1637 </dt>
1638 <dd>
1640 Disables the <code>renormalize</code> option. This overrides the
1641 <code>merge.renormalize</code> configuration variable.
1642 </p>
1643 </dd>
1644 <dt class="hdlist1">
1645 find-renames[=&lt;n&gt;]
1646 </dt>
1647 <dd>
1649 Turn on rename detection, optionally setting the similarity
1650 threshold. This is the default. This overrides the
1651 <em>merge.renames</em> configuration variable.
1652 See also <a href="git-diff.html">git-diff(1)</a> <code>--find-renames</code>.
1653 </p>
1654 </dd>
1655 <dt class="hdlist1">
1656 rename-threshold=&lt;n&gt;
1657 </dt>
1658 <dd>
1660 Deprecated synonym for <code>find-renames=&lt;n&gt;</code>.
1661 </p>
1662 </dd>
1663 <dt class="hdlist1">
1664 subtree[=&lt;path&gt;]
1665 </dt>
1666 <dd>
1668 This option is a more advanced form of <em>subtree</em> strategy, where
1669 the strategy makes a guess on how two trees must be shifted to
1670 match with each other when merging. Instead, the specified path
1671 is prefixed (or stripped from the beginning) to make the shape of
1672 two trees to match.
1673 </p>
1674 </dd>
1675 </dl></div>
1676 </dd>
1677 <dt class="hdlist1">
1678 recursive
1679 </dt>
1680 <dd>
1682 This can only resolve two heads using a 3-way merge
1683 algorithm. When there is more than one common
1684 ancestor that can be used for 3-way merge, it creates a
1685 merged tree of the common ancestors and uses that as
1686 the reference tree for the 3-way merge. This has been
1687 reported to result in fewer merge conflicts without
1688 causing mismerges by tests done on actual merge commits
1689 taken from Linux 2.6 kernel development history.
1690 Additionally this can detect and handle merges involving
1691 renames. It does not make use of detected copies. This was
1692 the default strategy for resolving two heads from Git v0.99.9k
1693 until v2.33.0.
1694 </p>
1695 <div class="paragraph"><p>The <em>recursive</em> strategy takes the same options as <em>ort</em>. However,
1696 there are three additional options that <em>ort</em> ignores (not documented
1697 above) that are potentially useful with the <em>recursive</em> strategy:</p></div>
1698 <div class="dlist"><dl>
1699 <dt class="hdlist1">
1700 patience
1701 </dt>
1702 <dd>
1704 Deprecated synonym for <code>diff-algorithm=patience</code>.
1705 </p>
1706 </dd>
1707 <dt class="hdlist1">
1708 diff-algorithm=[patience|minimal|histogram|myers]
1709 </dt>
1710 <dd>
1712 Use a different diff algorithm while merging, which can help
1713 avoid mismerges that occur due to unimportant matching lines
1714 (such as braces from distinct functions). See also
1715 <a href="git-diff.html">git-diff(1)</a> <code>--diff-algorithm</code>. Note that <code>ort</code>
1716 specifically uses <code>diff-algorithm=histogram</code>, while <code>recursive</code>
1717 defaults to the <code>diff.algorithm</code> config setting.
1718 </p>
1719 </dd>
1720 <dt class="hdlist1">
1721 no-renames
1722 </dt>
1723 <dd>
1725 Turn off rename detection. This overrides the <code>merge.renames</code>
1726 configuration variable.
1727 See also <a href="git-diff.html">git-diff(1)</a> <code>--no-renames</code>.
1728 </p>
1729 </dd>
1730 </dl></div>
1731 </dd>
1732 <dt class="hdlist1">
1733 resolve
1734 </dt>
1735 <dd>
1737 This can only resolve two heads (i.e. the current branch
1738 and another branch you pulled from) using a 3-way merge
1739 algorithm. It tries to carefully detect criss-cross
1740 merge ambiguities. It does not handle renames.
1741 </p>
1742 </dd>
1743 <dt class="hdlist1">
1744 octopus
1745 </dt>
1746 <dd>
1748 This resolves cases with more than two heads, but refuses to do
1749 a complex merge that needs manual resolution. It is
1750 primarily meant to be used for bundling topic branch
1751 heads together. This is the default merge strategy when
1752 pulling or merging more than one branch.
1753 </p>
1754 </dd>
1755 <dt class="hdlist1">
1756 ours
1757 </dt>
1758 <dd>
1760 This resolves any number of heads, but the resulting tree of the
1761 merge is always that of the current branch head, effectively
1762 ignoring all changes from all other branches. It is meant to
1763 be used to supersede old development history of side
1764 branches. Note that this is different from the -Xours option to
1765 the <em>recursive</em> merge strategy.
1766 </p>
1767 </dd>
1768 <dt class="hdlist1">
1769 subtree
1770 </dt>
1771 <dd>
1773 This is a modified <code>ort</code> strategy. When merging trees A and
1774 B, if B corresponds to a subtree of A, B is first adjusted to
1775 match the tree structure of A, instead of reading the trees at
1776 the same level. This adjustment is also done to the common
1777 ancestor tree.
1778 </p>
1779 </dd>
1780 </dl></div>
1781 <div class="paragraph"><p>With the strategies that use 3-way merge (including the default, <em>ort</em>),
1782 if a change is made on both branches, but later reverted on one of the
1783 branches, that change will be present in the merged result; some people find
1784 this behavior confusing. It occurs because only the heads and the merge base
1785 are considered when performing a merge, not the individual commits. The merge
1786 algorithm therefore considers the reverted change as no change at all, and
1787 substitutes the changed version instead.</p></div>
1788 </div>
1789 </div>
1790 <div class="sect1">
1791 <h2 id="_configuration">CONFIGURATION</h2>
1792 <div class="sectionbody">
1793 <div class="dlist"><dl>
1794 <dt class="hdlist1">
1795 branch.&lt;name&gt;.mergeOptions
1796 </dt>
1797 <dd>
1799 Sets default options for merging into branch &lt;name&gt;. The syntax and
1800 supported options are the same as those of <em>git merge</em>, but option
1801 values containing whitespace characters are currently not supported.
1802 </p>
1803 </dd>
1804 </dl></div>
1805 <div class="paragraph"><p>Everything above this line in this section isn&#8217;t included from the
1806 <a href="git-config.html">git-config(1)</a> documentation. The content that follows is the
1807 same as what&#8217;s found there:</p></div>
1808 <div class="dlist"><dl>
1809 <dt class="hdlist1">
1810 merge.conflictStyle
1811 </dt>
1812 <dd>
1814 Specify the style in which conflicted hunks are written out to
1815 working tree files upon merge. The default is "merge", which
1816 shows a <code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</code> conflict marker, changes made by one side,
1817 a <code>=======</code> marker, changes made by the other side, and then
1818 a <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code> marker. An alternate style, "diff3", adds a <code>|||||||</code>
1819 marker and the original text before the <code>=======</code> marker. The
1820 "merge" style tends to produce smaller conflict regions than diff3,
1821 both because of the exclusion of the original text, and because
1822 when a subset of lines match on the two sides, they are just pulled
1823 out of the conflict region. Another alternate style, "zdiff3", is
1824 similar to diff3 but removes matching lines on the two sides from
1825 the conflict region when those matching lines appear near either
1826 the beginning or end of a conflict region.
1827 </p>
1828 </dd>
1829 <dt class="hdlist1">
1830 merge.defaultToUpstream
1831 </dt>
1832 <dd>
1834 If merge is called without any commit argument, merge the upstream
1835 branches configured for the current branch by using their last
1836 observed values stored in their remote-tracking branches.
1837 The values of the <code>branch.&lt;current branch&gt;.merge</code> that name the
1838 branches at the remote named by <code>branch.&lt;current branch&gt;.remote</code>
1839 are consulted, and then they are mapped via <code>remote.&lt;remote&gt;.fetch</code>
1840 to their corresponding remote-tracking branches, and the tips of
1841 these tracking branches are merged. Defaults to true.
1842 </p>
1843 </dd>
1844 <dt class="hdlist1">
1845 merge.ff
1846 </dt>
1847 <dd>
1849 By default, Git does not create an extra merge commit when merging
1850 a commit that is a descendant of the current commit. Instead, the
1851 tip of the current branch is fast-forwarded. When set to <code>false</code>,
1852 this variable tells Git to create an extra merge commit in such
1853 a case (equivalent to giving the <code>--no-ff</code> option from the command
1854 line). When set to <code>only</code>, only such fast-forward merges are
1855 allowed (equivalent to giving the <code>--ff-only</code> option from the
1856 command line).
1857 </p>
1858 </dd>
1859 <dt class="hdlist1">
1860 merge.verifySignatures
1861 </dt>
1862 <dd>
1864 If true, this is equivalent to the --verify-signatures command
1865 line option. See <a href="git-merge.html">git-merge(1)</a> for details.
1866 </p>
1867 </dd>
1868 <dt class="hdlist1">
1869 merge.branchdesc
1870 </dt>
1871 <dd>
1873 In addition to branch names, populate the log message with
1874 the branch description text associated with them. Defaults
1875 to false.
1876 </p>
1877 </dd>
1878 <dt class="hdlist1">
1879 merge.log
1880 </dt>
1881 <dd>
1883 In addition to branch names, populate the log message with at
1884 most the specified number of one-line descriptions from the
1885 actual commits that are being merged. Defaults to false, and
1886 true is a synonym for 20.
1887 </p>
1888 </dd>
1889 <dt class="hdlist1">
1890 merge.suppressDest
1891 </dt>
1892 <dd>
1894 By adding a glob that matches the names of integration
1895 branches to this multi-valued configuration variable, the
1896 default merge message computed for merges into these
1897 integration branches will omit "into &lt;branch name&gt;" from
1898 its title.
1899 </p>
1900 <div class="paragraph"><p>An element with an empty value can be used to clear the list
1901 of globs accumulated from previous configuration entries.
1902 When there is no <code>merge.suppressDest</code> variable defined, the
1903 default value of <code>master</code> is used for backward compatibility.</p></div>
1904 </dd>
1905 <dt class="hdlist1">
1906 merge.renameLimit
1907 </dt>
1908 <dd>
1910 The number of files to consider in the exhaustive portion of
1911 rename detection during a merge. If not specified, defaults
1912 to the value of diff.renameLimit. If neither
1913 merge.renameLimit nor diff.renameLimit are specified,
1914 currently defaults to 7000. This setting has no effect if
1915 rename detection is turned off.
1916 </p>
1917 </dd>
1918 <dt class="hdlist1">
1919 merge.renames
1920 </dt>
1921 <dd>
1923 Whether Git detects renames. If set to "false", rename detection
1924 is disabled. If set to "true", basic rename detection is enabled.
1925 Defaults to the value of diff.renames.
1926 </p>
1927 </dd>
1928 <dt class="hdlist1">
1929 merge.directoryRenames
1930 </dt>
1931 <dd>
1933 Whether Git detects directory renames, affecting what happens at
1934 merge time to new files added to a directory on one side of
1935 history when that directory was renamed on the other side of
1936 history. If merge.directoryRenames is set to "false", directory
1937 rename detection is disabled, meaning that such new files will be
1938 left behind in the old directory. If set to "true", directory
1939 rename detection is enabled, meaning that such new files will be
1940 moved into the new directory. If set to "conflict", a conflict
1941 will be reported for such paths. If merge.renames is false,
1942 merge.directoryRenames is ignored and treated as false. Defaults
1943 to "conflict".
1944 </p>
1945 </dd>
1946 <dt class="hdlist1">
1947 merge.renormalize
1948 </dt>
1949 <dd>
1951 Tell Git that canonical representation of files in the
1952 repository has changed over time (e.g. earlier commits record
1953 text files with CRLF line endings, but recent ones use LF line
1954 endings). In such a repository, Git can convert the data
1955 recorded in commits to a canonical form before performing a
1956 merge to reduce unnecessary conflicts. For more information,
1957 see section "Merging branches with differing checkin/checkout
1958 attributes" in <a href="gitattributes.html">gitattributes(5)</a>.
1959 </p>
1960 </dd>
1961 <dt class="hdlist1">
1962 merge.stat
1963 </dt>
1964 <dd>
1966 Whether to print the diffstat between ORIG_HEAD and the merge result
1967 at the end of the merge. True by default.
1968 </p>
1969 </dd>
1970 <dt class="hdlist1">
1971 merge.autoStash
1972 </dt>
1973 <dd>
1975 When set to true, automatically create a temporary stash entry
1976 before the operation begins, and apply it after the operation
1977 ends. This means that you can run merge on a dirty worktree.
1978 However, use with care: the final stash application after a
1979 successful merge might result in non-trivial conflicts.
1980 This option can be overridden by the <code>--no-autostash</code> and
1981 <code>--autostash</code> options of <a href="git-merge.html">git-merge(1)</a>.
1982 Defaults to false.
1983 </p>
1984 </dd>
1985 <dt class="hdlist1">
1986 merge.tool
1987 </dt>
1988 <dd>
1990 Controls which merge tool is used by <a href="git-mergetool.html">git-mergetool(1)</a>.
1991 The list below shows the valid built-in values.
1992 Any other value is treated as a custom merge tool and requires
1993 that a corresponding mergetool.&lt;tool&gt;.cmd variable is defined.
1994 </p>
1995 </dd>
1996 <dt class="hdlist1">
1997 merge.guitool
1998 </dt>
1999 <dd>
2001 Controls which merge tool is used by <a href="git-mergetool.html">git-mergetool(1)</a> when the
2002 -g/--gui flag is specified. The list below shows the valid built-in values.
2003 Any other value is treated as a custom merge tool and requires that a
2004 corresponding mergetool.&lt;guitool&gt;.cmd variable is defined.
2005 </p>
2006 <div class="dlist"><dl>
2007 <dt class="hdlist1">
2008 <code>araxis</code>
2009 </dt>
2010 <dd>
2012 Use Araxis Merge (requires a graphical session)
2013 </p>
2014 </dd>
2015 <dt class="hdlist1">
2016 <code>bc</code>
2017 </dt>
2018 <dd>
2020 Use Beyond Compare (requires a graphical session)
2021 </p>
2022 </dd>
2023 <dt class="hdlist1">
2024 <code>bc3</code>
2025 </dt>
2026 <dd>
2028 Use Beyond Compare (requires a graphical session)
2029 </p>
2030 </dd>
2031 <dt class="hdlist1">
2032 <code>bc4</code>
2033 </dt>
2034 <dd>
2036 Use Beyond Compare (requires a graphical session)
2037 </p>
2038 </dd>
2039 <dt class="hdlist1">
2040 <code>codecompare</code>
2041 </dt>
2042 <dd>
2044 Use Code Compare (requires a graphical session)
2045 </p>
2046 </dd>
2047 <dt class="hdlist1">
2048 <code>deltawalker</code>
2049 </dt>
2050 <dd>
2052 Use DeltaWalker (requires a graphical session)
2053 </p>
2054 </dd>
2055 <dt class="hdlist1">
2056 <code>diffmerge</code>
2057 </dt>
2058 <dd>
2060 Use DiffMerge (requires a graphical session)
2061 </p>
2062 </dd>
2063 <dt class="hdlist1">
2064 <code>diffuse</code>
2065 </dt>
2066 <dd>
2068 Use Diffuse (requires a graphical session)
2069 </p>
2070 </dd>
2071 <dt class="hdlist1">
2072 <code>ecmerge</code>
2073 </dt>
2074 <dd>
2076 Use ECMerge (requires a graphical session)
2077 </p>
2078 </dd>
2079 <dt class="hdlist1">
2080 <code>emerge</code>
2081 </dt>
2082 <dd>
2084 Use Emacs' Emerge
2085 </p>
2086 </dd>
2087 <dt class="hdlist1">
2088 <code>examdiff</code>
2089 </dt>
2090 <dd>
2092 Use ExamDiff Pro (requires a graphical session)
2093 </p>
2094 </dd>
2095 <dt class="hdlist1">
2096 <code>guiffy</code>
2097 </dt>
2098 <dd>
2100 Use Guiffy&#8217;s Diff Tool (requires a graphical session)
2101 </p>
2102 </dd>
2103 <dt class="hdlist1">
2104 <code>gvimdiff</code>
2105 </dt>
2106 <dd>
2108 Use gVim (requires a graphical session) with a custom layout (see <code>git help mergetool</code>'s <code>BACKEND SPECIFIC HINTS</code> section)
2109 </p>
2110 </dd>
2111 <dt class="hdlist1">
2112 <code>gvimdiff1</code>
2113 </dt>
2114 <dd>
2116 Use gVim (requires a graphical session) with a 2 panes layout (LOCAL and REMOTE)
2117 </p>
2118 </dd>
2119 <dt class="hdlist1">
2120 <code>gvimdiff2</code>
2121 </dt>
2122 <dd>
2124 Use gVim (requires a graphical session) with a 3 panes layout (LOCAL, MERGED and REMOTE)
2125 </p>
2126 </dd>
2127 <dt class="hdlist1">
2128 <code>gvimdiff3</code>
2129 </dt>
2130 <dd>
2132 Use gVim (requires a graphical session) where only the MERGED file is shown
2133 </p>
2134 </dd>
2135 <dt class="hdlist1">
2136 <code>kdiff3</code>
2137 </dt>
2138 <dd>
2140 Use KDiff3 (requires a graphical session)
2141 </p>
2142 </dd>
2143 <dt class="hdlist1">
2144 <code>meld</code>
2145 </dt>
2146 <dd>
2148 Use Meld (requires a graphical session) with optional <code>auto merge</code> (see <code>git help mergetool</code>'s <code>CONFIGURATION</code> section)
2149 </p>
2150 </dd>
2151 <dt class="hdlist1">
2152 <code>nvimdiff</code>
2153 </dt>
2154 <dd>
2156 Use Neovim with a custom layout (see <code>git help mergetool</code>'s <code>BACKEND SPECIFIC HINTS</code> section)
2157 </p>
2158 </dd>
2159 <dt class="hdlist1">
2160 <code>nvimdiff1</code>
2161 </dt>
2162 <dd>
2164 Use Neovim with a 2 panes layout (LOCAL and REMOTE)
2165 </p>
2166 </dd>
2167 <dt class="hdlist1">
2168 <code>nvimdiff2</code>
2169 </dt>
2170 <dd>
2172 Use Neovim with a 3 panes layout (LOCAL, MERGED and REMOTE)
2173 </p>
2174 </dd>
2175 <dt class="hdlist1">
2176 <code>nvimdiff3</code>
2177 </dt>
2178 <dd>
2180 Use Neovim where only the MERGED file is shown
2181 </p>
2182 </dd>
2183 <dt class="hdlist1">
2184 <code>opendiff</code>
2185 </dt>
2186 <dd>
2188 Use FileMerge (requires a graphical session)
2189 </p>
2190 </dd>
2191 <dt class="hdlist1">
2192 <code>p4merge</code>
2193 </dt>
2194 <dd>
2196 Use HelixCore P4Merge (requires a graphical session)
2197 </p>
2198 </dd>
2199 <dt class="hdlist1">
2200 <code>smerge</code>
2201 </dt>
2202 <dd>
2204 Use Sublime Merge (requires a graphical session)
2205 </p>
2206 </dd>
2207 <dt class="hdlist1">
2208 <code>tkdiff</code>
2209 </dt>
2210 <dd>
2212 Use TkDiff (requires a graphical session)
2213 </p>
2214 </dd>
2215 <dt class="hdlist1">
2216 <code>tortoisemerge</code>
2217 </dt>
2218 <dd>
2220 Use TortoiseMerge (requires a graphical session)
2221 </p>
2222 </dd>
2223 <dt class="hdlist1">
2224 <code>vimdiff</code>
2225 </dt>
2226 <dd>
2228 Use Vim with a custom layout (see <code>git help mergetool</code>'s <code>BACKEND SPECIFIC HINTS</code> section)
2229 </p>
2230 </dd>
2231 <dt class="hdlist1">
2232 <code>vimdiff1</code>
2233 </dt>
2234 <dd>
2236 Use Vim with a 2 panes layout (LOCAL and REMOTE)
2237 </p>
2238 </dd>
2239 <dt class="hdlist1">
2240 <code>vimdiff2</code>
2241 </dt>
2242 <dd>
2244 Use Vim with a 3 panes layout (LOCAL, MERGED and REMOTE)
2245 </p>
2246 </dd>
2247 <dt class="hdlist1">
2248 <code>vimdiff3</code>
2249 </dt>
2250 <dd>
2252 Use Vim where only the MERGED file is shown
2253 </p>
2254 </dd>
2255 <dt class="hdlist1">
2256 <code>winmerge</code>
2257 </dt>
2258 <dd>
2260 Use WinMerge (requires a graphical session)
2261 </p>
2262 </dd>
2263 <dt class="hdlist1">
2264 <code>xxdiff</code>
2265 </dt>
2266 <dd>
2268 Use xxdiff (requires a graphical session)
2269 </p>
2270 </dd>
2271 </dl></div>
2272 </dd>
2273 <dt class="hdlist1">
2274 merge.verbosity
2275 </dt>
2276 <dd>
2278 Controls the amount of output shown by the recursive merge
2279 strategy. Level 0 outputs nothing except a final error
2280 message if conflicts were detected. Level 1 outputs only
2281 conflicts, 2 outputs conflicts and file changes. Level 5 and
2282 above outputs debugging information. The default is level 2.
2283 Can be overridden by the <code>GIT_MERGE_VERBOSITY</code> environment variable.
2284 </p>
2285 </dd>
2286 <dt class="hdlist1">
2287 merge.&lt;driver&gt;.name
2288 </dt>
2289 <dd>
2291 Defines a human-readable name for a custom low-level
2292 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.
2293 </p>
2294 </dd>
2295 <dt class="hdlist1">
2296 merge.&lt;driver&gt;.driver
2297 </dt>
2298 <dd>
2300 Defines the command that implements a custom low-level
2301 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.
2302 </p>
2303 </dd>
2304 <dt class="hdlist1">
2305 merge.&lt;driver&gt;.recursive
2306 </dt>
2307 <dd>
2309 Names a low-level merge driver to be used when
2310 performing an internal merge between common ancestors.
2311 See <a href="gitattributes.html">gitattributes(5)</a> for details.
2312 </p>
2313 </dd>
2314 </dl></div>
2315 </div>
2316 </div>
2317 <div class="sect1">
2318 <h2 id="_see_also">SEE ALSO</h2>
2319 <div class="sectionbody">
2320 <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>,
2321 <a href="gitattributes.html">gitattributes(5)</a>,
2322 <a href="git-reset.html">git-reset(1)</a>,
2323 <a href="git-diff.html">git-diff(1)</a>, <a href="git-ls-files.html">git-ls-files(1)</a>,
2324 <a href="git-add.html">git-add(1)</a>, <a href="git-rm.html">git-rm(1)</a>,
2325 <a href="git-mergetool.html">git-mergetool(1)</a></p></div>
2326 </div>
2327 </div>
2328 <div class="sect1">
2329 <h2 id="_git">GIT</h2>
2330 <div class="sectionbody">
2331 <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
2332 </div>
2333 </div>
2334 </div>
2335 <div id="footnotes"><hr /></div>
2336 <div id="footer">
2337 <div id="footer-text">
2338 Last updated
2339 2023-12-27 15:50:18 PST
2340 </div>
2341 </div>
2342 </body>
2343 </html>