blob: 819a5853778a24707ddeabe919af2de2b573e234 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4<head>
Junio C Hamano9d971152012-12-19 00:43:115<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
6<meta name="generator" content="AsciiDoc 8.6.8" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-merge(1)</title>
Junio C Hamano1a4e8412005-12-27 08:17:238<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:119/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
10
11/* Default font. */
12body {
13 font-family: Georgia,serif;
14}
15
16/* Title font. */
17h1, h2, h3, h4, h5, h6,
18div.title, caption.title,
19thead, p.table.header,
20#toctitle,
21#author, #revnumber, #revdate, #revremark,
22#footer {
23 font-family: Arial,Helvetica,sans-serif;
Junio C Hamano1a4e8412005-12-27 08:17:2324}
25
26body {
27 margin: 1em 5% 1em 5%;
28}
29
Junio C Hamanoba4b9282008-07-06 05:20:3130a {
31 color: blue;
32 text-decoration: underline;
33}
34a:visited {
35 color: fuchsia;
36}
Junio C Hamano1a4e8412005-12-27 08:17:2337
38em {
39 font-style: italic;
Junio C Hamano68cf15a2010-11-06 01:01:5940 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2341}
42
43strong {
44 font-weight: bold;
Junio C Hamano68cf15a2010-11-06 01:01:5945 color: #083194;
Junio C Hamano1a4e8412005-12-27 08:17:2346}
47
Junio C Hamano1a4e8412005-12-27 08:17:2348h1, h2, h3, h4, h5, h6 {
49 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:2350 margin-top: 1.2em;
51 margin-bottom: 0.5em;
52 line-height: 1.3;
53}
54
Junio C Hamanoba4b9282008-07-06 05:20:3155h1, h2, h3 {
Junio C Hamano1a4e8412005-12-27 08:17:2356 border-bottom: 2px solid silver;
57}
58h2 {
Junio C Hamano1a4e8412005-12-27 08:17:2359 padding-top: 0.5em;
60}
Junio C Hamanoba4b9282008-07-06 05:20:3161h3 {
62 float: left;
63}
64h3 + * {
65 clear: left;
66}
Junio C Hamano9d971152012-12-19 00:43:1167h5 {
68 font-size: 1.0em;
69}
Junio C Hamano1a4e8412005-12-27 08:17:2370
71div.sectionbody {
Junio C Hamano1a4e8412005-12-27 08:17:2372 margin-left: 0;
73}
74
75hr {
76 border: 1px solid silver;
77}
78
79p {
80 margin-top: 0.5em;
81 margin-bottom: 0.5em;
82}
83
Junio C Hamano68cf15a2010-11-06 01:01:5984ul, ol, li > p {
85 margin-top: 0;
86}
Junio C Hamano9d971152012-12-19 00:43:1187ul > li { color: #aaa; }
88ul > li > * { color: black; }
Junio C Hamano68cf15a2010-11-06 01:01:5989
Junio C Hamano9d971152012-12-19 00:43:1190.monospaced, code, pre {
91 font-family: "Courier New", Courier, monospace;
92 font-size: inherit;
93 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:2394 padding: 0;
95 margin: 0;
96}
97
Junio C Hamano9d971152012-12-19 00:43:1198
99#author {
Junio C Hamano1a4e8412005-12-27 08:17:23100 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23101 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31102 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23103}
Junio C Hamano9d971152012-12-19 00:43:11104#email {
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9d971152012-12-19 00:43:11106#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
108
Junio C Hamano9d971152012-12-19 00:43:11109#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23110 font-size: small;
111 border-top: 2px solid silver;
112 padding-top: 0.5em;
113 margin-top: 4.0em;
114}
Junio C Hamano9d971152012-12-19 00:43:11115#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23116 float: left;
117 padding-bottom: 0.5em;
118}
Junio C Hamano9d971152012-12-19 00:43:11119#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23120 float: right;
121 padding-bottom: 0.5em;
122}
123
Junio C Hamano9d971152012-12-19 00:43:11124#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59125 margin-top: 1.5em;
126 margin-bottom: 1.5em;
127}
Junio C Hamano9d971152012-12-19 00:43:11128div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23129div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
130div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22131 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23132 margin-bottom: 1.5em;
133}
134div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22135 margin-top: 2.0em;
136 margin-bottom: 2.0em;
137 margin-right: 10%;
138 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23139}
140
141div.content { /* Block element content. */
142 padding: 0;
143}
144
145/* Block element titles. */
146div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59147 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23148 font-weight: bold;
149 text-align: left;
150 margin-top: 1.0em;
151 margin-bottom: 0.5em;
152}
153div.title + * {
154 margin-top: 0;
155}
156
157td div.title:first-child {
158 margin-top: 0.0em;
159}
160div.content div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content + div.title {
164 margin-top: 0.0em;
165}
166
167div.sidebarblock > div.content {
168 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11169 border: 1px solid #dddddd;
170 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23171 padding: 0.5em;
172}
173
174div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11175 border: 1px solid #dddddd;
176 border-left: 5px solid #f0f0f0;
177 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23178 padding: 0.5em;
179}
180
Junio C Hamano7bd050f2011-09-22 06:32:22181div.quoteblock, div.verseblock {
182 padding-left: 1.0em;
183 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59184 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11185 border-left: 5px solid #f0f0f0;
186 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23187}
Junio C Hamano7bd050f2011-09-22 06:32:22188
Junio C Hamano68cf15a2010-11-06 01:01:59189div.quoteblock > div.attribution {
190 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23191 text-align: right;
192}
Junio C Hamano68cf15a2010-11-06 01:01:59193
Junio C Hamano9d971152012-12-19 00:43:11194div.verseblock > pre.content {
195 font-family: inherit;
196 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59197}
198div.verseblock > div.attribution {
199 padding-top: 0.75em;
200 text-align: left;
201}
202/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31203div.verseblock + div.attribution {
204 text-align: left;
205}
Junio C Hamano1a4e8412005-12-27 08:17:23206
207div.admonitionblock .icon {
208 vertical-align: top;
209 font-size: 1.1em;
210 font-weight: bold;
211 text-decoration: underline;
212 color: #527bbd;
213 padding-right: 0.5em;
214}
215div.admonitionblock td.content {
216 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22217 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23218}
219
220div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22221 border-left: 3px solid #dddddd;
222 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23223}
224
Junio C Hamano1a4e8412005-12-27 08:17:23225div.imageblock div.content { padding-left: 0; }
Junio C Hamano1a4e8412005-12-27 08:17:23226span.image img { border-style: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59227a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23228
229dl {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
232}
233dt {
234 margin-top: 0.5em;
235 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59236 font-style: normal;
237 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23238}
239dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59240 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23241}
242
243ul, ol {
244 list-style-position: outside;
245}
Junio C Hamano68cf15a2010-11-06 01:01:59246ol.arabic {
247 list-style-type: decimal;
248}
249ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23250 list-style-type: lower-alpha;
251}
Junio C Hamano68cf15a2010-11-06 01:01:59252ol.upperalpha {
253 list-style-type: upper-alpha;
254}
255ol.lowerroman {
256 list-style-type: lower-roman;
257}
258ol.upperroman {
259 list-style-type: upper-roman;
260}
261
262div.compact ul, div.compact ol,
263div.compact p, div.compact p,
264div.compact div, div.compact div {
265 margin-top: 0.1em;
266 margin-bottom: 0.1em;
267}
Junio C Hamano1a4e8412005-12-27 08:17:23268
Junio C Hamano1a4e8412005-12-27 08:17:23269tfoot {
270 font-weight: bold;
271}
Junio C Hamano68cf15a2010-11-06 01:01:59272td > div.verse {
273 white-space: pre;
274}
Junio C Hamano68cf15a2010-11-06 01:01:59275
276div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23277 margin-top: 0.8em;
278 margin-bottom: 0.8em;
279}
Junio C Hamano68cf15a2010-11-06 01:01:59280div.hdlist tr {
281 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31282}
Junio C Hamano68cf15a2010-11-06 01:01:59283dt.hdlist1.strong, td.hdlist1.strong {
284 font-weight: bold;
285}
286td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23287 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59288 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23289 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59290 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23291}
Junio C Hamano68cf15a2010-11-06 01:01:59292td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23293 vertical-align: top;
294}
Junio C Hamano68cf15a2010-11-06 01:01:59295div.hdlist.compact tr {
296 margin: 0;
297 padding-bottom: 0;
298}
299
300.comment {
301 background: yellow;
302}
Junio C Hamano1a4e8412005-12-27 08:17:23303
Junio C Hamano7bd050f2011-09-22 06:32:22304.footnote, .footnoteref {
305 font-size: 0.8em;
306}
307
308span.footnote, span.footnoteref {
309 vertical-align: super;
310}
311
312#footnotes {
313 margin: 20px 0 20px 0;
314 padding: 7px 0 0 0;
315}
316
317#footnotes div.footnote {
318 margin: 0 0 5px 0;
319}
320
321#footnotes hr {
322 border: none;
323 border-top: 1px solid silver;
324 height: 1px;
325 text-align: left;
326 margin-left: 0;
327 width: 20%;
328 min-width: 100px;
329}
330
Junio C Hamano9d971152012-12-19 00:43:11331div.colist td {
332 padding-right: 0.5em;
333 padding-bottom: 0.3em;
334 vertical-align: top;
335}
336div.colist td img {
337 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23338}
Junio C Hamanoba4b9282008-07-06 05:20:31339
Junio C Hamano9d971152012-12-19 00:43:11340@media print {
341 #footer-badges { display: none; }
342}
343
344#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22345 margin-bottom: 2.5em;
346}
347
Junio C Hamano9d971152012-12-19 00:43:11348#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31349 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31350 font-size: 1.1em;
351 font-weight: bold;
352 margin-top: 1.0em;
353 margin-bottom: 0.1em;
354}
355
Junio C Hamano9d971152012-12-19 00:43:11356div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31357 margin-top: 0;
358 margin-bottom: 0;
359}
360div.toclevel2 {
361 margin-left: 2em;
362 font-size: 0.9em;
363}
364div.toclevel3 {
365 margin-left: 4em;
366 font-size: 0.9em;
367}
368div.toclevel4 {
369 margin-left: 6em;
370 font-size: 0.9em;
371}
Junio C Hamano9d971152012-12-19 00:43:11372
373span.aqua { color: aqua; }
374span.black { color: black; }
375span.blue { color: blue; }
376span.fuchsia { color: fuchsia; }
377span.gray { color: gray; }
378span.green { color: green; }
379span.lime { color: lime; }
380span.maroon { color: maroon; }
381span.navy { color: navy; }
382span.olive { color: olive; }
383span.purple { color: purple; }
384span.red { color: red; }
385span.silver { color: silver; }
386span.teal { color: teal; }
387span.white { color: white; }
388span.yellow { color: yellow; }
389
390span.aqua-background { background: aqua; }
391span.black-background { background: black; }
392span.blue-background { background: blue; }
393span.fuchsia-background { background: fuchsia; }
394span.gray-background { background: gray; }
395span.green-background { background: green; }
396span.lime-background { background: lime; }
397span.maroon-background { background: maroon; }
398span.navy-background { background: navy; }
399span.olive-background { background: olive; }
400span.purple-background { background: purple; }
401span.red-background { background: red; }
402span.silver-background { background: silver; }
403span.teal-background { background: teal; }
404span.white-background { background: white; }
405span.yellow-background { background: yellow; }
406
407span.big { font-size: 2em; }
408span.small { font-size: 0.6em; }
409
410span.underline { text-decoration: underline; }
411span.overline { text-decoration: overline; }
412span.line-through { text-decoration: line-through; }
413
414div.unbreakable { page-break-inside: avoid; }
415
416
417/*
418 * xhtml11 specific
419 *
420 * */
421
422div.tableblock {
423 margin-top: 1.0em;
424 margin-bottom: 1.5em;
425}
426div.tableblock > table {
427 border: 3px solid #527bbd;
428}
429thead, p.table.header {
430 font-weight: bold;
431 color: #527bbd;
432}
433p.table {
434 margin-top: 0;
435}
436/* Because the table frame attribute is overriden by CSS in most browsers. */
437div.tableblock > table[frame="void"] {
438 border-style: none;
439}
440div.tableblock > table[frame="hsides"] {
441 border-left-style: none;
442 border-right-style: none;
443}
444div.tableblock > table[frame="vsides"] {
445 border-top-style: none;
446 border-bottom-style: none;
447}
448
449
450/*
451 * html5 specific
452 *
453 * */
454
455table.tableblock {
456 margin-top: 1.0em;
457 margin-bottom: 1.5em;
458}
459thead, p.tableblock.header {
460 font-weight: bold;
461 color: #527bbd;
462}
463p.tableblock {
464 margin-top: 0;
465}
466table.tableblock {
467 border-width: 3px;
468 border-spacing: 0px;
469 border-style: solid;
470 border-color: #527bbd;
471 border-collapse: collapse;
472}
473th.tableblock, td.tableblock {
474 border-width: 1px;
475 padding: 4px;
476 border-style: solid;
477 border-color: #527bbd;
478}
479
480table.tableblock.frame-topbot {
481 border-left-style: hidden;
482 border-right-style: hidden;
483}
484table.tableblock.frame-sides {
485 border-top-style: hidden;
486 border-bottom-style: hidden;
487}
488table.tableblock.frame-none {
489 border-style: hidden;
490}
491
492th.tableblock.halign-left, td.tableblock.halign-left {
493 text-align: left;
494}
495th.tableblock.halign-center, td.tableblock.halign-center {
496 text-align: center;
497}
498th.tableblock.halign-right, td.tableblock.halign-right {
499 text-align: right;
500}
501
502th.tableblock.valign-top, td.tableblock.valign-top {
503 vertical-align: top;
504}
505th.tableblock.valign-middle, td.tableblock.valign-middle {
506 vertical-align: middle;
507}
508th.tableblock.valign-bottom, td.tableblock.valign-bottom {
509 vertical-align: bottom;
510}
511
512
513/*
514 * manpage specific
515 *
516 * */
517
518body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59519 padding-top: 0.5em;
520 padding-bottom: 0.5em;
521 border-top: 2px solid silver;
522 border-bottom: 2px solid silver;
523}
Junio C Hamano9d971152012-12-19 00:43:11524body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59525 border-style: none;
526}
Junio C Hamano9d971152012-12-19 00:43:11527body.manpage div.sectionbody {
528 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59529}
530
531@media print {
Junio C Hamano9d971152012-12-19 00:43:11532 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59533}
534
Junio C Hamano1a4e8412005-12-27 08:17:23535
Junio C Hamano1a4e8412005-12-27 08:17:23536</style>
Junio C Hamano7bd050f2011-09-22 06:32:22537<script type="text/javascript">
538/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22539var asciidoc = { // Namespace.
540
541/////////////////////////////////////////////////////////////////////
542// Table Of Contents generator
543/////////////////////////////////////////////////////////////////////
544
545/* Author: Mihai Bazon, September 2002
546 * http://students.infoiasi.ro/~mishoo
547 *
548 * Table Of Content generator
549 * Version: 0.4
550 *
551 * Feel free to use this script under the terms of the GNU General Public
552 * License, as long as you do not remove or alter this notice.
553 */
554
555 /* modified by Troy D. Hanson, September 2006. License: GPL */
556 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
557
558// toclevels = 1..4.
559toc: function (toclevels) {
560
561 function getText(el) {
562 var text = "";
563 for (var i = el.firstChild; i != null; i = i.nextSibling) {
564 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
565 text += i.data;
566 else if (i.firstChild != null)
567 text += getText(i);
568 }
569 return text;
570 }
571
572 function TocEntry(el, text, toclevel) {
573 this.element = el;
574 this.text = text;
575 this.toclevel = toclevel;
576 }
577
578 function tocEntries(el, toclevels) {
579 var result = new Array;
Junio C Hamano9d971152012-12-19 00:43:11580 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22581 // Function that scans the DOM tree for header elements (the DOM2
582 // nodeIterator API would be a better technique but not supported by all
583 // browsers).
584 var iterate = function (el) {
585 for (var i = el.firstChild; i != null; i = i.nextSibling) {
586 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
587 var mo = re.exec(i.tagName);
588 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
589 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
590 }
591 iterate(i);
592 }
593 }
594 }
595 iterate(el);
596 return result;
597 }
598
599 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11600 if (!toc) {
601 return;
602 }
603
604 // Delete existing TOC entries in case we're reloading the TOC.
605 var tocEntriesToRemove = [];
606 var i;
607 for (i = 0; i < toc.childNodes.length; i++) {
608 var entry = toc.childNodes[i];
609 if (entry.nodeName.toLowerCase() == 'div'
610 && entry.getAttribute("class")
611 && entry.getAttribute("class").match(/^toclevel/))
612 tocEntriesToRemove.push(entry);
613 }
614 for (i = 0; i < tocEntriesToRemove.length; i++) {
615 toc.removeChild(tocEntriesToRemove[i]);
616 }
617
618 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22619 var entries = tocEntries(document.getElementById("content"), toclevels);
620 for (var i = 0; i < entries.length; ++i) {
621 var entry = entries[i];
622 if (entry.element.id == "")
623 entry.element.id = "_toc_" + i;
624 var a = document.createElement("a");
625 a.href = "#" + entry.element.id;
626 a.appendChild(document.createTextNode(entry.text));
627 var div = document.createElement("div");
628 div.appendChild(a);
629 div.className = "toclevel" + entry.toclevel;
630 toc.appendChild(div);
631 }
632 if (entries.length == 0)
633 toc.parentNode.removeChild(toc);
634},
635
636
637/////////////////////////////////////////////////////////////////////
638// Footnotes generator
639/////////////////////////////////////////////////////////////////////
640
641/* Based on footnote generation code from:
642 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
643 */
644
645footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11646 // Delete existing footnote entries in case we're reloading the footnodes.
647 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22648 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11649 if (!noteholder) {
650 return;
651 }
652 var entriesToRemove = [];
653 for (i = 0; i < noteholder.childNodes.length; i++) {
654 var entry = noteholder.childNodes[i];
655 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
656 entriesToRemove.push(entry);
657 }
658 for (i = 0; i < entriesToRemove.length; i++) {
659 noteholder.removeChild(entriesToRemove[i]);
660 }
661
662 // Rebuild footnote entries.
663 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22664 var spans = cont.getElementsByTagName("span");
665 var refs = {};
666 var n = 0;
667 for (i=0; i<spans.length; i++) {
668 if (spans[i].className == "footnote") {
669 n++;
Junio C Hamano9d971152012-12-19 00:43:11670 var note = spans[i].getAttribute("data-note");
671 if (!note) {
672 // Use [\s\S] in place of . so multi-line matches work.
673 // Because JavaScript has no s (dotall) regex flag.
674 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
675 spans[i].innerHTML =
676 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
677 "' title='View footnote' class='footnote'>" + n + "</a>]";
678 spans[i].setAttribute("data-note", note);
679 }
Junio C Hamano7bd050f2011-09-22 06:32:22680 noteholder.innerHTML +=
681 "<div class='footnote' id='_footnote_" + n + "'>" +
682 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
683 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22684 var id =spans[i].getAttribute("id");
685 if (id != null) refs["#"+id] = n;
686 }
687 }
688 if (n == 0)
689 noteholder.parentNode.removeChild(noteholder);
690 else {
691 // Process footnoterefs.
692 for (i=0; i<spans.length; i++) {
693 if (spans[i].className == "footnoteref") {
694 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
695 href = href.match(/#.*/)[0]; // Because IE return full URL.
696 n = refs[href];
697 spans[i].innerHTML =
698 "[<a href='#_footnote_" + n +
699 "' title='View footnote' class='footnote'>" + n + "</a>]";
700 }
701 }
702 }
Junio C Hamano9d971152012-12-19 00:43:11703},
704
705install: function(toclevels) {
706 var timerId;
707
708 function reinstall() {
709 asciidoc.footnotes();
710 if (toclevels) {
711 asciidoc.toc(toclevels);
712 }
713 }
714
715 function reinstallAndRemoveTimer() {
716 clearInterval(timerId);
717 reinstall();
718 }
719
720 timerId = setInterval(reinstall, 500);
721 if (document.addEventListener)
722 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
723 else
724 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22725}
726
727}
Junio C Hamano9d971152012-12-19 00:43:11728asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22729/*]]>*/
730</script>
Junio C Hamano1a4e8412005-12-27 08:17:23731</head>
Junio C Hamano9d971152012-12-19 00:43:11732<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23733<div id="header">
734<h1>
735git-merge(1) Manual Page
736</h1>
737<h2>NAME</h2>
738<div class="sectionbody">
739<p>git-merge -
Junio C Hamano7c73c662007-01-19 00:37:50740 Join two or more development histories together
Junio C Hamano1a4e8412005-12-27 08:17:23741</p>
742</div>
743</div>
Junio C Hamano7bd050f2011-09-22 06:32:22744<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11745<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59746<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23747<div class="sectionbody">
Junio C Hamanoee6d9612006-11-27 20:03:22748<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11749<pre class="content"><em>git merge</em> [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
Junio C Hamanoaef76442013-10-18 22:11:27750 [-s &lt;strategy&gt;] [-X &lt;strategy-option&gt;] [-S[&lt;keyid&gt;]]
Junio C Hamanoa03ac862011-04-02 04:32:29751 [--[no-]rerere-autoupdate] [-m &lt;msg&gt;] [&lt;commit&gt;&#8230;]
Junio C Hamano788eeba2010-12-08 22:50:43752<em>git merge</em> &lt;msg&gt; HEAD &lt;commit&gt;&#8230;
Junio C Hamano9d971152012-12-19 00:43:11753<em>git merge</em> --abort</pre>
754<div class="attribution">
Junio C Hamano68cf15a2010-11-06 01:01:59755</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23756</div>
Junio C Hamano9d971152012-12-19 00:43:11757</div>
758<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31759<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23760<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59761<div class="paragraph"><p>Incorporates changes from the named commits (since the time their
Junio C Hamanod0d892c2010-01-24 20:06:29762histories diverged from the current branch) into the current
763branch. This command is used by <em>git pull</em> to incorporate changes
764from another repository and can be used by hand to merge changes
765from one branch into another.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59766<div class="paragraph"><p>Assume the following history exists and the current branch is
Junio C Hamano9d971152012-12-19 00:43:11767"<code>master</code>":</p></div>
Junio C Hamanod0d892c2010-01-24 20:06:29768<div class="listingblock">
769<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11770<pre><code> A---B---C topic
Junio C Hamanod0d892c2010-01-24 20:06:29771 /
Junio C Hamano9d971152012-12-19 00:43:11772 D---E---F---G master</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:29773</div></div>
Junio C Hamano9d971152012-12-19 00:43:11774<div class="paragraph"><p>Then "<code>git merge topic</code>" will replay the changes made on the
775<code>topic</code> branch since it diverged from <code>master</code> (i.e., <code>E</code>) until
776its current commit (<code>C</code>) on top of <code>master</code>, and record the result
Junio C Hamanod0d892c2010-01-24 20:06:29777in a new commit along with the names of the two parent commits and
778a log message from the user describing the changes.</p></div>
779<div class="listingblock">
780<div class="content">
Junio C Hamano9d971152012-12-19 00:43:11781<pre><code> A---B---C topic
Junio C Hamanod0d892c2010-01-24 20:06:29782 / \
Junio C Hamano9d971152012-12-19 00:43:11783 D---E---F---G---H master</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:29784</div></div>
Junio C Hamano9d971152012-12-19 00:43:11785<div class="paragraph"><p>The second syntax (&lt;msg&gt; <code>HEAD</code> &lt;commit&gt;&#8230;) is supported for
Junio C Hamano1974bf22007-10-31 05:57:20786historical reasons. Do not use it from the command line or in
Junio C Hamano9d971152012-12-19 00:43:11787new scripts. It is the same as <code>git merge -m &lt;msg&gt; &lt;commit&gt;...</code>.</p></div>
788<div class="paragraph"><p>The third syntax ("<code>git merge --abort</code>") can only be run after the
Junio C Hamano788eeba2010-12-08 22:50:43789merge has resulted in conflicts. <em>git merge --abort</em> will abort the
790merge process and try to reconstruct the pre-merge state. However,
791if there were uncommitted changes when the merge started (and
792especially if those changes were further modified after the merge
793was started), <em>git merge --abort</em> will in some cases be unable to
794reconstruct the original (pre-merge) changes. Therefore:</p></div>
Junio C Hamano3a3357e2013-06-26 23:20:56795<div class="paragraph"><p><strong>Warning</strong>: Running <em>git merge</em> with non-trivial uncommitted changes is
796discouraged: while possible, it may leave you in a state that is hard to
Junio C Hamano1aa40d22010-01-21 17:46:43797back out of in the case of a conflict.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23798</div>
Junio C Hamano9d971152012-12-19 00:43:11799</div>
800<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31801<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23802<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59803<div class="dlist"><dl>
804<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55805--commit
806</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59807<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55808--no-commit
809</dt>
810<dd>
811<p>
812 Perform the merge and commit the result. This option can
813 be used to override --no-commit.
814</p>
Junio C Hamano68cf15a2010-11-06 01:01:59815<div class="paragraph"><p>With --no-commit perform the merge but pretend the merge
Junio C Hamanoc21ab052009-10-31 04:03:55816failed and do not autocommit, to give the user a chance to
817inspect and further tweak the merge result before committing.</p></div>
818</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59819<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:09820--edit
821</dt>
822<dt class="hdlist1">
Junio C Hamano7e590a12013-06-02 23:46:52823-e
824</dt>
825<dt class="hdlist1">
Junio C Hamano795a5a32012-02-02 01:36:37826--no-edit
Junio C Hamano11821ed2011-10-19 18:42:09827</dt>
828<dd>
Junio C Hamano92887a32011-12-07 00:26:29829<p>
Junio C Hamano795a5a32012-02-02 01:36:37830 Invoke an editor before committing successful mechanical merge to
831 further edit the auto-generated merge message, so that the user
Junio C Hamano9d971152012-12-19 00:43:11832 can explain and justify the merge. The <code>--no-edit</code> option can be
Junio C Hamano795a5a32012-02-02 01:36:37833 used to accept the auto-generated message (this is generally
Junio C Hamano7e590a12013-06-02 23:46:52834 discouraged). The <code>--edit</code> (or <code>-e</code>) option is still useful if you are
Junio C Hamano9d971152012-12-19 00:43:11835 giving a draft message with the <code>-m</code> option from the command line
Junio C Hamano795a5a32012-02-02 01:36:37836 and want to edit it in the editor.
Junio C Hamano92887a32011-12-07 00:26:29837</p>
Junio C Hamano795a5a32012-02-02 01:36:37838<div class="paragraph"><p>Older scripts may depend on the historical behaviour of not allowing the
839user to edit the merge log message. They will see an editor opened when
Junio C Hamano9d971152012-12-19 00:43:11840they run <code>git merge</code>. To make it easier to adjust such scripts to the
841updated behaviour, the environment variable <code>GIT_MERGE_AUTOEDIT</code> can be
842set to <code>no</code> at the beginning of them.</p></div>
Junio C Hamano11821ed2011-10-19 18:42:09843</dd>
844<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55845--ff
846</dt>
Junio C Hamanof54f08e2012-02-27 07:49:19847<dd>
848<p>
849 When the merge resolves as a fast-forward, only update the branch
850 pointer, without creating a merge commit. This is the default
851 behavior.
852</p>
853</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59854<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55855--no-ff
856</dt>
857<dd>
858<p>
Junio C Hamanof54f08e2012-02-27 07:49:19859 Create a merge commit even when the merge resolves as a
Junio C Hamano778a3412013-03-28 23:24:30860 fast-forward. This is the default behaviour when merging an
861 annotated (and possibly signed) tag.
Junio C Hamanoc21ab052009-10-31 04:03:55862</p>
Junio C Hamanof54f08e2012-02-27 07:49:19863</dd>
864<dt class="hdlist1">
865--ff-only
866</dt>
867<dd>
868<p>
869 Refuse to merge and exit with a non-zero status unless the
Junio C Hamano9d971152012-12-19 00:43:11870 current <code>HEAD</code> is already up-to-date or the merge can be
Junio C Hamanof54f08e2012-02-27 07:49:19871 resolved as a fast-forward.
872</p>
Junio C Hamanoc21ab052009-10-31 04:03:55873</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59874<dt class="hdlist1">
Junio C Hamano3b4609d2010-09-30 00:04:34875--log[=&lt;n&gt;]
Junio C Hamanoc21ab052009-10-31 04:03:55876</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59877<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55878--no-log
879</dt>
880<dd>
881<p>
882 In addition to branch names, populate the log message with
Junio C Hamano3b4609d2010-09-30 00:04:34883 one-line descriptions from at most &lt;n&gt; actual commits that are being
Junio C Hamanoa28a9202012-06-21 07:08:23884 merged. See also <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>.
Junio C Hamanoc21ab052009-10-31 04:03:55885</p>
Junio C Hamano68cf15a2010-11-06 01:01:59886<div class="paragraph"><p>With --no-log do not list one-line descriptions from the
Junio C Hamanoc21ab052009-10-31 04:03:55887actual commits being merged.</p></div>
888</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59889<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55890--stat
891</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59892<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55893-n
894</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59895<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55896--no-stat
897</dt>
898<dd>
899<p>
900 Show a diffstat at the end of the merge. The diffstat is also
901 controlled by the configuration option merge.stat.
902</p>
Junio C Hamano68cf15a2010-11-06 01:01:59903<div class="paragraph"><p>With -n or --no-stat do not show a diffstat at the end of the
Junio C Hamanoc21ab052009-10-31 04:03:55904merge.</p></div>
905</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59906<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55907--squash
908</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59909<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55910--no-squash
911</dt>
912<dd>
913<p>
914 Produce the working tree and index state as if a real
915 merge happened (except for the merge information),
916 but do not actually make a commit or
Junio C Hamano9d971152012-12-19 00:43:11917 move the <code>HEAD</code>, nor record <code>$GIT_DIR/MERGE_HEAD</code> to
918 cause the next <code>git commit</code> command to create a merge
Junio C Hamanoc21ab052009-10-31 04:03:55919 commit. This allows you to create a single commit on
920 top of the current branch whose effect is the same as
921 merging another branch (or more in case of an octopus).
922</p>
Junio C Hamano68cf15a2010-11-06 01:01:59923<div class="paragraph"><p>With --no-squash perform the merge and commit the result. This
Junio C Hamanoc21ab052009-10-31 04:03:55924option can be used to override --squash.</p></div>
925</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59926<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55927-s &lt;strategy&gt;
928</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59929<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55930--strategy=&lt;strategy&gt;
931</dt>
932<dd>
933<p>
934 Use the given merge strategy; can be supplied more than
935 once to specify them in the order they should be tried.
Junio C Hamano9d971152012-12-19 00:43:11936 If there is no <code>-s</code> option, a built-in list of strategies
Junio C Hamano1aa40d22010-01-21 17:46:43937 is used instead (<em>git merge-recursive</em> when merging a single
938 head, <em>git merge-octopus</em> otherwise).
Junio C Hamanoc21ab052009-10-31 04:03:55939</p>
940</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59941<dt class="hdlist1">
Junio C Hamanob04bb3f2010-04-14 14:07:36942-X &lt;option&gt;
943</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59944<dt class="hdlist1">
Junio C Hamanob04bb3f2010-04-14 14:07:36945--strategy-option=&lt;option&gt;
946</dt>
947<dd>
948<p>
949 Pass merge strategy specific option through to the merge
950 strategy.
951</p>
952</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59953<dt class="hdlist1">
Junio C Hamanoedf80bd2013-04-05 22:14:36954--verify-signatures
955</dt>
956<dt class="hdlist1">
957--no-verify-signatures
958</dt>
959<dd>
960<p>
961 Verify that the commits being merged have good and trusted GPG signatures
962 and abort the merge in case they do not.
963</p>
964</dd>
965<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55966--summary
967</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59968<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55969--no-summary
970</dt>
971<dd>
972<p>
973 Synonyms to --stat and --no-stat; these are deprecated and will be
974 removed in the future.
975</p>
976</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59977<dt class="hdlist1">
Junio C Hamano610d1762008-11-28 06:27:13978-q
979</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59980<dt class="hdlist1">
Junio C Hamano610d1762008-11-28 06:27:13981--quiet
982</dt>
983<dd>
984<p>
Junio C Hamanod2c978f2011-03-20 19:42:22985 Operate quietly. Implies --no-progress.
Junio C Hamano610d1762008-11-28 06:27:13986</p>
987</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59988<dt class="hdlist1">
Junio C Hamano610d1762008-11-28 06:27:13989-v
990</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59991<dt class="hdlist1">
Junio C Hamano610d1762008-11-28 06:27:13992--verbose
993</dt>
994<dd>
995<p>
996 Be verbose.
997</p>
998</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59999<dt class="hdlist1">
Junio C Hamanod2c978f2011-03-20 19:42:221000--progress
1001</dt>
1002<dt class="hdlist1">
1003--no-progress
1004</dt>
1005<dd>
1006<p>
1007 Turn progress on/off explicitly. If neither is specified,
1008 progress is shown if standard error is connected to a terminal.
1009 Note that not all merge strategies may support progress
1010 reporting.
1011</p>
1012</dd>
1013<dt class="hdlist1">
Junio C Hamanoaef76442013-10-18 22:11:271014-S[&lt;keyid&gt;]
1015</dt>
1016<dt class="hdlist1">
1017--gpg-sign[=&lt;keyid&gt;]
1018</dt>
1019<dd>
1020<p>
1021 GPG-sign the resulting merge commit.
1022</p>
1023</dd>
1024<dt class="hdlist1">
Junio C Hamano1974bf22007-10-31 05:57:201025-m &lt;msg&gt;
Junio C Hamano1a4e8412005-12-27 08:17:231026</dt>
1027<dd>
1028<p>
Junio C Hamanoc0e55e72009-10-10 00:56:291029 Set the commit message to be used for the merge commit (in
Junio C Hamanof5de4cf2010-06-19 00:33:171030 case one is created).
Junio C Hamano1a4e8412005-12-27 08:17:231031</p>
Junio C Hamano9d971152012-12-19 00:43:111032<div class="paragraph"><p>If <code>--log</code> is specified, a shortlog of the commits being merged
Junio C Hamano68cf15a2010-11-06 01:01:591033will be appended to the specified message.</p></div>
1034<div class="paragraph"><p>The <em>git fmt-merge-msg</em> command can be
1035used to give a good default for automated <em>git merge</em>
1036invocations.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231037</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591038<dt class="hdlist1">
Junio C Hamano3d1b5a12013-05-17 23:34:021039--[no-]rerere-autoupdate
Junio C Hamano19107ef2010-01-19 06:20:591040</dt>
1041<dd>
1042<p>
1043 Allow the rerere mechanism to update the index with the
1044 result of auto-conflict resolution if possible.
1045</p>
1046</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591047<dt class="hdlist1">
Junio C Hamano788eeba2010-12-08 22:50:431048--abort
1049</dt>
1050<dd>
1051<p>
1052 Abort the current conflict resolution process, and
1053 try to reconstruct the pre-merge state.
1054</p>
1055<div class="paragraph"><p>If there were uncommitted worktree changes present when the merge
1056started, <em>git merge --abort</em> will in some cases be unable to
1057reconstruct these changes. It is therefore recommended to always
1058commit or stash your changes before running <em>git merge</em>.</p></div>
1059<div class="paragraph"><p><em>git merge --abort</em> is equivalent to <em>git reset --merge</em> when
Junio C Hamano9d971152012-12-19 00:43:111060<code>MERGE_HEAD</code> is present.</p></div>
Junio C Hamano788eeba2010-12-08 22:50:431061</dd>
1062<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431063&lt;commit&gt;&#8230;
Junio C Hamano1a4e8412005-12-27 08:17:231064</dt>
1065<dd>
1066<p>
Junio C Hamano1aa40d22010-01-21 17:46:431067 Commits, usually other branch heads, to merge into our branch.
Junio C Hamanoa03ac862011-04-02 04:32:291068 Specifying more than one commit will create a merge with
1069 more than two parents (affectionately called an Octopus merge).
Junio C Hamano1a4e8412005-12-27 08:17:231070</p>
Junio C Hamano9d971152012-12-19 00:43:111071<div class="paragraph"><p>If no commit is given from the command line, and if <code>merge.defaultToUpstream</code>
Junio C Hamanoa1295452012-11-13 22:32:041072configuration variable is set, merge the remote-tracking branches
Junio C Hamanoa03ac862011-04-02 04:32:291073that the current branch is configured to use as its upstream.
1074See also the configuration section of this manual page.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231075</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311076</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231077</div>
Junio C Hamano9d971152012-12-19 00:43:111078</div>
1079<div class="sect1">
Junio C Hamanod0d892c2010-01-24 20:06:291080<h2 id="_pre_merge_checks">PRE-MERGE CHECKS</h2>
1081<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591082<div class="paragraph"><p>Before applying outside changes, you should get your own work in
Junio C Hamanod0d892c2010-01-24 20:06:291083good shape and committed locally, so it will not be clobbered if
Junio C Hamanoa28a9202012-06-21 07:08:231084there are conflicts. See also <a href="git-stash.html">git-stash(1)</a>.
Junio C Hamanod0d892c2010-01-24 20:06:291085<em>git pull</em> and <em>git merge</em> will stop without doing anything when
1086local uncommitted changes overlap with files that <em>git pull</em>/<em>git
1087merge</em> may need to update.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591088<div class="paragraph"><p>To avoid recording unrelated changes in the merge commit,
Junio C Hamanod0d892c2010-01-24 20:06:291089<em>git pull</em> and <em>git merge</em> will also abort if there are any changes
Junio C Hamano9d971152012-12-19 00:43:111090registered in the index relative to the <code>HEAD</code> commit. (One
Junio C Hamanod0d892c2010-01-24 20:06:291091exception is when the changed index entries are in the state that
1092would result from the merge already.)</p></div>
Junio C Hamano9d971152012-12-19 00:43:111093<div class="paragraph"><p>If all named commits are already ancestors of <code>HEAD</code>, <em>git merge</em>
Junio C Hamanod0d892c2010-01-24 20:06:291094will exit early with the message "Already up-to-date."</p></div>
1095</div>
Junio C Hamano9d971152012-12-19 00:43:111096</div>
1097<div class="sect1">
Junio C Hamanod0d892c2010-01-24 20:06:291098<h2 id="_fast_forward_merge">FAST-FORWARD MERGE</h2>
1099<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591100<div class="paragraph"><p>Often the current branch head is an ancestor of the named commit.
Junio C Hamanod0d892c2010-01-24 20:06:291101This is the most common case especially when invoked from <em>git
1102pull</em>: you are tracking an upstream repository, you have committed
1103no local changes, and now you want to update to a newer upstream
1104revision. In this case, a new commit is not needed to store the
Junio C Hamano9d971152012-12-19 00:43:111105combined history; instead, the <code>HEAD</code> (along with the index) is
Junio C Hamanod0d892c2010-01-24 20:06:291106updated to point at the named commit, without creating an extra
1107merge commit.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111108<div class="paragraph"><p>This behavior can be suppressed with the <code>--no-ff</code> option.</p></div>
Junio C Hamanod0d892c2010-01-24 20:06:291109</div>
Junio C Hamano9d971152012-12-19 00:43:111110</div>
1111<div class="sect1">
Junio C Hamanod0d892c2010-01-24 20:06:291112<h2 id="_true_merge">TRUE MERGE</h2>
1113<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591114<div class="paragraph"><p>Except in a fast-forward merge (see above), the branches to be
Junio C Hamanod0d892c2010-01-24 20:06:291115merged must be tied together by a merge commit that has both of them
1116as its parents.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591117<div class="paragraph"><p>A merged version reconciling the changes from all branches to be
Junio C Hamano9d971152012-12-19 00:43:111118merged is committed, and your <code>HEAD</code>, index, and working tree are
Junio C Hamanod0d892c2010-01-24 20:06:291119updated to it. It is possible to have modifications in the working
1120tree as long as they do not overlap; the update will preserve them.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591121<div class="paragraph"><p>When it is not obvious how to reconcile the changes, the following
Junio C Hamanod0d892c2010-01-24 20:06:291122happens:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591123<div class="olist arabic"><ol class="arabic">
Junio C Hamanod0d892c2010-01-24 20:06:291124<li>
1125<p>
Junio C Hamano9d971152012-12-19 00:43:111126The <code>HEAD</code> pointer stays the same.
Junio C Hamanod0d892c2010-01-24 20:06:291127</p>
1128</li>
1129<li>
1130<p>
Junio C Hamano9d971152012-12-19 00:43:111131The <code>MERGE_HEAD</code> ref is set to point to the other branch head.
Junio C Hamanod0d892c2010-01-24 20:06:291132</p>
1133</li>
1134<li>
1135<p>
1136Paths that merged cleanly are updated both in the index file and
1137 in your working tree.
1138</p>
1139</li>
1140<li>
1141<p>
1142For conflicting paths, the index file records up to three
1143 versions: stage 1 stores the version from the common ancestor,
Junio C Hamano9d971152012-12-19 00:43:111144 stage 2 from <code>HEAD</code>, and stage 3 from <code>MERGE_HEAD</code> (you
1145 can inspect the stages with <code>git ls-files -u</code>). The working
Junio C Hamanod0d892c2010-01-24 20:06:291146 tree files contain the result of the "merge" program; i.e. 3-way
Junio C Hamano9d971152012-12-19 00:43:111147 merge results with familiar conflict markers <code>&lt;&lt;&lt;</code> <code>===</code> <code>&gt;&gt;&gt;</code>.
Junio C Hamanod0d892c2010-01-24 20:06:291148</p>
1149</li>
1150<li>
1151<p>
1152No other changes are made. In particular, the local
1153 modifications you had before you started merge will stay the
1154 same and the index entries for them stay as they were,
Junio C Hamano9d971152012-12-19 00:43:111155 i.e. matching <code>HEAD</code>.
Junio C Hamanod0d892c2010-01-24 20:06:291156</p>
1157</li>
1158</ol></div>
Junio C Hamano68cf15a2010-11-06 01:01:591159<div class="paragraph"><p>If you tried a merge which resulted in complex conflicts and
Junio C Hamano9d971152012-12-19 00:43:111160want to start over, you can recover with <code>git merge --abort</code>.</p></div>
Junio C Hamanod0d892c2010-01-24 20:06:291161</div>
Junio C Hamano9d971152012-12-19 00:43:111162</div>
1163<div class="sect1">
Junio C Hamano778a3412013-03-28 23:24:301164<h2 id="_merging_tag">MERGING TAG</h2>
1165<div class="sectionbody">
1166<div class="paragraph"><p>When merging an annotated (and possibly signed) tag, Git always
1167creates a merge commit even if a fast-forward merge is possible, and
1168the commit message template is prepared with the tag message.
1169Additionally, if the tag is signed, the signature check is reported
1170as a comment in the message template. See also <a href="git-tag.html">git-tag(1)</a>.</p></div>
1171<div class="paragraph"><p>When you want to just integrate with the work leading to the commit
1172that happens to be tagged, e.g. synchronizing with an upstream
1173release point, you may not want to make an unnecessary merge commit.</p></div>
1174<div class="paragraph"><p>In such a case, you can "unwrap" the tag yourself before feeding it
1175to <code>git merge</code>, or pass <code>--ff-only</code> when you do not have any work on
1176your own. e.g.</p></div>
Junio C Hamano91e33952013-09-05 23:42:261177<div class="listingblock">
1178<div class="content">
1179<pre><code>git fetch origin
Junio C Hamano778a3412013-03-28 23:24:301180git merge v1.2.3^0
Junio C Hamano91e33952013-09-05 23:42:261181git merge --ff-only v1.2.3</code></pre>
1182</div></div>
Junio C Hamano778a3412013-03-28 23:24:301183</div>
1184</div>
1185<div class="sect1">
Junio C Hamanod0d892c2010-01-24 20:06:291186<h2 id="_how_conflicts_are_presented">HOW CONFLICTS ARE PRESENTED</h2>
1187<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591188<div class="paragraph"><p>During a merge, the working tree files are updated to reflect the result
1189of the merge. Among the changes made to the common ancestor&#8217;s version,
Junio C Hamanod0d892c2010-01-24 20:06:291190non-overlapping ones (that is, you changed an area of the file while the
1191other side left that area intact, or vice versa) are incorporated in the
1192final result verbatim. When both sides made changes to the same area,
Junio C Hamano076ffcc2013-02-06 05:13:211193however, Git cannot randomly pick one side over the other, and asks you to
Junio C Hamanod0d892c2010-01-24 20:06:291194resolve it by leaving what both sides did to that area.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:211195<div class="paragraph"><p>By default, Git uses the same style as the one used by the "merge" program
Junio C Hamanod0d892c2010-01-24 20:06:291196from the RCS suite to present such a conflicted hunk, like this:</p></div>
1197<div class="listingblock">
1198<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111199<pre><code>Here are lines that are either unchanged from the common
Junio C Hamanod0d892c2010-01-24 20:06:291200ancestor, or cleanly resolved because only one side changed.
1201&lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1202Conflict resolution is hard;
1203let's go shopping.
1204=======
1205Git makes conflict resolution easy.
1206&gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
Junio C Hamano9d971152012-12-19 00:43:111207And here is another line that is cleanly resolved or unmodified.</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:291208</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591209<div class="paragraph"><p>The area where a pair of conflicting changes happened is marked with markers
Junio C Hamano9d971152012-12-19 00:43:111210<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>
Junio C Hamanod0d892c2010-01-24 20:06:291211is typically your side, and the part afterwards is typically their side.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591212<div class="paragraph"><p>The default format does not show what the original said in the conflicting
Junio C Hamanod0d892c2010-01-24 20:06:291213area. You cannot tell how many lines are deleted and replaced with
Junio C Hamano68cf15a2010-11-06 01:01:591214Barbie&#8217;s remark on your side. The only thing you can tell is that your
1215side wants to say it is hard and you&#8217;d prefer to go shopping, while the
Junio C Hamanod0d892c2010-01-24 20:06:291216other side wants to claim it is easy.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591217<div class="paragraph"><p>An alternative style can be used by setting the "merge.conflictstyle"
Junio C Hamanod0d892c2010-01-24 20:06:291218configuration variable to "diff3". In "diff3" style, the above conflict
1219may look like this:</p></div>
1220<div class="listingblock">
1221<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111222<pre><code>Here are lines that are either unchanged from the common
Junio C Hamanod0d892c2010-01-24 20:06:291223ancestor, or cleanly resolved because only one side changed.
1224&lt;&lt;&lt;&lt;&lt;&lt;&lt; yours:sample.txt
1225Conflict resolution is hard;
1226let's go shopping.
1227|||||||
1228Conflict resolution is hard.
1229=======
1230Git makes conflict resolution easy.
1231&gt;&gt;&gt;&gt;&gt;&gt;&gt; theirs:sample.txt
Junio C Hamano9d971152012-12-19 00:43:111232And here is another line that is cleanly resolved or unmodified.</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:291233</div></div>
Junio C Hamano9d971152012-12-19 00:43:111234<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
1235another <code>|||||||</code> marker that is followed by the original text. You can
Junio C Hamanod0d892c2010-01-24 20:06:291236tell that the original just stated a fact, and your side simply gave in to
1237that statement and gave up, while the other side tried to have a more
1238positive attitude. You can sometimes come up with a better resolution by
1239viewing the original.</p></div>
1240</div>
Junio C Hamano9d971152012-12-19 00:43:111241</div>
1242<div class="sect1">
Junio C Hamanod0d892c2010-01-24 20:06:291243<h2 id="_how_to_resolve_conflicts">HOW TO RESOLVE CONFLICTS</h2>
1244<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591245<div class="paragraph"><p>After seeing a conflict, you can do two things:</p></div>
1246<div class="ulist"><ul>
Junio C Hamanod0d892c2010-01-24 20:06:291247<li>
1248<p>
1249Decide not to merge. The only clean-ups you need are to reset
Junio C Hamano9d971152012-12-19 00:43:111250 the index file to the <code>HEAD</code> commit to reverse 2. and to clean
1251 up working tree changes made by 2. and 3.; <code>git merge --abort</code>
Junio C Hamano788eeba2010-12-08 22:50:431252 can be used for this.
Junio C Hamanod0d892c2010-01-24 20:06:291253</p>
1254</li>
1255<li>
1256<p>
1257Resolve the conflicts. Git will mark the conflicts in
1258 the working tree. Edit the files into shape and
1259 <em>git add</em> them to the index. Use <em>git commit</em> to seal the deal.
1260</p>
1261</li>
1262</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591263<div class="paragraph"><p>You can work through the conflict with a number of tools:</p></div>
1264<div class="ulist"><ul>
Junio C Hamanod0d892c2010-01-24 20:06:291265<li>
1266<p>
Junio C Hamano9d971152012-12-19 00:43:111267Use a mergetool. <code>git mergetool</code> to launch a graphical
Junio C Hamanod0d892c2010-01-24 20:06:291268 mergetool which will work you through the merge.
1269</p>
1270</li>
1271<li>
1272<p>
Junio C Hamano9d971152012-12-19 00:43:111273Look at the diffs. <code>git diff</code> will show a three-way diff,
1274 highlighting changes from both the <code>HEAD</code> and <code>MERGE_HEAD</code>
Junio C Hamanod0d892c2010-01-24 20:06:291275 versions.
1276</p>
1277</li>
1278<li>
1279<p>
Junio C Hamano9d971152012-12-19 00:43:111280Look at the diffs from each branch. <code>git log --merge -p &lt;path&gt;</code>
1281 will show diffs first for the <code>HEAD</code> version and then the
1282 <code>MERGE_HEAD</code> version.
Junio C Hamanod0d892c2010-01-24 20:06:291283</p>
1284</li>
1285<li>
1286<p>
Junio C Hamano9d971152012-12-19 00:43:111287Look at the originals. <code>git show :1:filename</code> shows the
1288 common ancestor, <code>git show :2:filename</code> shows the <code>HEAD</code>
1289 version, and <code>git show :3:filename</code> shows the <code>MERGE_HEAD</code>
Junio C Hamanod0d892c2010-01-24 20:06:291290 version.
1291</p>
1292</li>
1293</ul></div>
1294</div>
Junio C Hamano9d971152012-12-19 00:43:111295</div>
1296<div class="sect1">
Junio C Hamanod0d892c2010-01-24 20:06:291297<h2 id="_examples">EXAMPLES</h2>
1298<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591299<div class="ulist"><ul>
Junio C Hamanod0d892c2010-01-24 20:06:291300<li>
1301<p>
Junio C Hamano9d971152012-12-19 00:43:111302Merge branches <code>fixes</code> and <code>enhancements</code> on top of
Junio C Hamanod0d892c2010-01-24 20:06:291303 the current branch, making an octopus merge:
1304</p>
1305<div class="listingblock">
1306<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111307<pre><code>$ git merge fixes enhancements</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:291308</div></div>
1309</li>
1310<li>
1311<p>
Junio C Hamano9d971152012-12-19 00:43:111312Merge branch <code>obsolete</code> into the current branch, using <code>ours</code>
Junio C Hamanod0d892c2010-01-24 20:06:291313 merge strategy:
1314</p>
1315<div class="listingblock">
1316<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111317<pre><code>$ git merge -s ours obsolete</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:291318</div></div>
1319</li>
1320<li>
1321<p>
Junio C Hamano9d971152012-12-19 00:43:111322Merge branch <code>maint</code> into the current branch, but do not make
Junio C Hamanod0d892c2010-01-24 20:06:291323 a new commit automatically:
1324</p>
1325<div class="listingblock">
1326<div class="content">
Junio C Hamano9d971152012-12-19 00:43:111327<pre><code>$ git merge --no-commit maint</code></pre>
Junio C Hamanod0d892c2010-01-24 20:06:291328</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591329<div class="paragraph"><p>This can be used when you want to include further changes to the
Junio C Hamanod0d892c2010-01-24 20:06:291330merge, or want to write your own merge commit message.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591331<div class="paragraph"><p>You should refrain from abusing this option to sneak substantial
Junio C Hamanod0d892c2010-01-24 20:06:291332changes into a merge commit. Small fixups like bumping
1333release/version name would be acceptable.</p></div>
1334</li>
1335</ul></div>
1336</div>
Junio C Hamano9d971152012-12-19 00:43:111337</div>
1338<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311339<h2 id="_merge_strategies">MERGE STRATEGIES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231340<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591341<div class="paragraph"><p>The merge mechanism (<em>git-merge</em> and <em>git-pull</em> commands) allows the
Junio C Hamano9d971152012-12-19 00:43:111342backend <em>merge strategies</em> to be chosen with <code>-s</code> option. Some strategies
1343can also take their own options, which can be passed by giving <code>-X&lt;option&gt;</code>
Junio C Hamano1aa40d22010-01-21 17:46:431344arguments to <em>git-merge</em> and/or <em>git-pull</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591345<div class="dlist"><dl>
1346<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231347resolve
1348</dt>
1349<dd>
1350<p>
1351 This can only resolve two heads (i.e. the current branch
Junio C Hamano1de75722009-03-26 08:39:381352 and another branch you pulled from) using a 3-way merge
Junio C Hamano1a4e8412005-12-27 08:17:231353 algorithm. It tries to carefully detect criss-cross
1354 merge ambiguities and is considered generally safe and
1355 fast.
1356</p>
1357</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591358<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231359recursive
1360</dt>
1361<dd>
1362<p>
Junio C Hamano1de75722009-03-26 08:39:381363 This can only resolve two heads using a 3-way merge
1364 algorithm. When there is more than one common
1365 ancestor that can be used for 3-way merge, it creates a
Junio C Hamano1a4e8412005-12-27 08:17:231366 merged tree of the common ancestors and uses that as
1367 the reference tree for the 3-way merge. This has been
1368 reported to result in fewer merge conflicts without
1369 causing mis-merges by tests done on actual merge commits
1370 taken from Linux 2.6 kernel development history.
1371 Additionally this can detect and handle merges involving
1372 renames. This is the default merge strategy when
1373 pulling or merging one branch.
1374</p>
Junio C Hamano68cf15a2010-11-06 01:01:591375<div class="paragraph"><p>The <em>recursive</em> strategy can take the following options:</p></div>
1376<div class="dlist"><dl>
1377<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431378ours
1379</dt>
1380<dd>
1381<p>
1382 This option forces conflicting hunks to be auto-resolved cleanly by
1383 favoring <em>our</em> version. Changes from the other tree that do not
1384 conflict with our side are reflected to the merge result.
Junio C Hamanoa3cfb762012-09-15 05:32:141385 For a binary file, the entire contents are taken from our side.
Junio C Hamano1aa40d22010-01-21 17:46:431386</p>
Junio C Hamano68cf15a2010-11-06 01:01:591387<div class="paragraph"><p>This should not be confused with the <em>ours</em> merge strategy, which does not
Junio C Hamano1aa40d22010-01-21 17:46:431388even look at what the other tree contains at all. It discards everything
1389the other tree did, declaring <em>our</em> history contains all that happened in it.</p></div>
1390</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591391<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431392theirs
1393</dt>
1394<dd>
1395<p>
Junio C Hamanoa3cfb762012-09-15 05:32:141396 This is the opposite of <em>ours</em>.
Junio C Hamano1aa40d22010-01-21 17:46:431397</p>
1398</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591399<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541400patience
1401</dt>
1402<dd>
1403<p>
1404 With this option, <em>merge-recursive</em> spends a little extra time
1405 to avoid mismerges that sometimes occur due to unimportant
1406 matching lines (e.g., braces from distinct functions). Use
1407 this when the branches to be merged have diverged wildly.
Junio C Hamano9d971152012-12-19 00:43:111408 See also <a href="git-diff.html">git-diff(1)</a> <code>--patience</code>.
Junio C Hamano39c7a692010-10-27 06:08:541409</p>
1410</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591411<dt class="hdlist1">
Junio C Hamano1575c202013-04-15 20:25:591412diff-algorithm=[patience|minimal|histogram|myers]
1413</dt>
1414<dd>
1415<p>
1416 Tells <em>merge-recursive</em> to use a different diff algorithm, which
1417 can help avoid mismerges that occur due to unimportant matching
1418 lines (such as braces from distinct functions). See also
1419 <a href="git-diff.html">git-diff(1)</a> <code>--diff-algorithm</code>.
1420</p>
1421</dd>
1422<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541423ignore-space-change
1424</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591425<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541426ignore-all-space
1427</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591428<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541429ignore-space-at-eol
1430</dt>
1431<dd>
1432<p>
1433 Treats lines with the indicated type of whitespace change as
1434 unchanged for the sake of a three-way merge. Whitespace
1435 changes mixed with other changes to a line are not ignored.
Junio C Hamano9d971152012-12-19 00:43:111436 See also <a href="git-diff.html">git-diff(1)</a> <code>-b</code>, <code>-w</code>, and
1437 <code>--ignore-space-at-eol</code>.
Junio C Hamano39c7a692010-10-27 06:08:541438</p>
Junio C Hamano68cf15a2010-11-06 01:01:591439<div class="ulist"><ul>
Junio C Hamano39c7a692010-10-27 06:08:541440<li>
1441<p>
1442If <em>their</em> version only introduces whitespace changes to a line,
1443 <em>our</em> version is used;
1444</p>
1445</li>
1446<li>
1447<p>
1448If <em>our</em> version introduces whitespace changes but <em>their</em>
1449 version includes a substantial change, <em>their</em> version is used;
1450</p>
1451</li>
1452<li>
1453<p>
1454Otherwise, the merge proceeds in the usual way.
1455</p>
1456</li>
1457</ul></div>
1458</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591459<dt class="hdlist1">
Junio C Hamano2db3e752010-09-03 21:33:061460renormalize
1461</dt>
1462<dd>
1463<p>
1464 This runs a virtual check-out and check-in of all three stages
1465 of a file when resolving a three-way merge. This option is
1466 meant to be used when merging branches with different clean
1467 filters or end-of-line normalization rules. See "Merging
1468 branches with differing checkin/checkout attributes" in
Junio C Hamanoa28a9202012-06-21 07:08:231469 <a href="gitattributes.html">gitattributes(5)</a> for details.
Junio C Hamano2db3e752010-09-03 21:33:061470</p>
1471</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591472<dt class="hdlist1">
Junio C Hamano2db3e752010-09-03 21:33:061473no-renormalize
1474</dt>
1475<dd>
1476<p>
Junio C Hamano9d971152012-12-19 00:43:111477 Disables the <code>renormalize</code> option. This overrides the
1478 <code>merge.renormalize</code> configuration variable.
Junio C Hamano2db3e752010-09-03 21:33:061479</p>
1480</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591481<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541482rename-threshold=&lt;n&gt;
1483</dt>
1484<dd>
1485<p>
1486 Controls the similarity threshold used for rename detection.
Junio C Hamano9d971152012-12-19 00:43:111487 See also <a href="git-diff.html">git-diff(1)</a> <code>-M</code>.
Junio C Hamano39c7a692010-10-27 06:08:541488</p>
1489</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591490<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171491subtree[=&lt;path&gt;]
Junio C Hamano1aa40d22010-01-21 17:46:431492</dt>
1493<dd>
1494<p>
1495 This option is a more advanced form of <em>subtree</em> strategy, where
1496 the strategy makes a guess on how two trees must be shifted to
1497 match with each other when merging. Instead, the specified path
1498 is prefixed (or stripped from the beginning) to make the shape of
1499 two trees to match.
1500</p>
1501</dd>
1502</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231503</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591504<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231505octopus
1506</dt>
1507<dd>
1508<p>
Junio C Hamano1de75722009-03-26 08:39:381509 This resolves cases with more than two heads, but refuses to do
1510 a complex merge that needs manual resolution. It is
Junio C Hamano1a4e8412005-12-27 08:17:231511 primarily meant to be used for bundling topic branch
1512 heads together. This is the default merge strategy when
Junio C Hamano1de75722009-03-26 08:39:381513 pulling or merging more than one branch.
Junio C Hamano1a4e8412005-12-27 08:17:231514</p>
1515</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591516<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231517ours
1518</dt>
1519<dd>
1520<p>
Junio C Hamanobf984de2009-11-23 06:11:191521 This resolves any number of heads, but the resulting tree of the
1522 merge is always that of the current branch head, effectively
1523 ignoring all changes from all other branches. It is meant to
Junio C Hamano1a4e8412005-12-27 08:17:231524 be used to supersede old development history of side
Junio C Hamano1aa40d22010-01-21 17:46:431525 branches. Note that this is different from the -Xours option to
1526 the <em>recursive</em> merge strategy.
Junio C Hamano1a4e8412005-12-27 08:17:231527</p>
1528</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591529<dt class="hdlist1">
Junio C Hamanoe6c92032008-03-19 09:24:341530subtree
1531</dt>
1532<dd>
1533<p>
1534 This is a modified recursive strategy. When merging trees A and
1535 B, if B corresponds to a subtree of A, B is first adjusted to
1536 match the tree structure of A, instead of reading the trees at
1537 the same level. This adjustment is also done to the common
1538 ancestor tree.
1539</p>
1540</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311541</dl></div>
Junio C Hamano1a4e8412005-12-27 08:17:231542</div>
Junio C Hamano9d971152012-12-19 00:43:111543</div>
1544<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311545<h2 id="_configuration">CONFIGURATION</h2>
Junio C Hamano1e6e0062007-07-13 05:33:251546<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591547<div class="dlist"><dl>
1548<dt class="hdlist1">
Junio C Hamano4653c6f2008-11-26 22:50:201549merge.conflictstyle
Junio C Hamano1e6e0062007-07-13 05:33:251550</dt>
1551<dd>
1552<p>
Junio C Hamano4653c6f2008-11-26 22:50:201553 Specify the style in which conflicted hunks are written out to
1554 working tree files upon merge. The default is "merge", which
Junio C Hamano9d971152012-12-19 00:43:111555 shows a <code>&lt;&lt;&lt;&lt;&lt;&lt;&lt;</code> conflict marker, changes made by one side,
1556 a <code>=======</code> marker, changes made by the other side, and then
1557 a <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt;</code> marker. An alternate style, "diff3", adds a <code>|||||||</code>
1558 marker and the original text before the <code>=======</code> marker.
Junio C Hamano6d76d612008-05-09 05:46:081559</p>
1560</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591561<dt class="hdlist1">
Junio C Hamanoa03ac862011-04-02 04:32:291562merge.defaultToUpstream
1563</dt>
1564<dd>
1565<p>
1566 If merge is called without any commit argument, merge the upstream
1567 branches configured for the current branch by using their last
Junio C Hamanoa1295452012-11-13 22:32:041568 observed values stored in their remote-tracking branches.
Junio C Hamano9d971152012-12-19 00:43:111569 The values of the <code>branch.&lt;current branch&gt;.merge</code> that name the
1570 branches at the remote named by <code>branch.&lt;current branch&gt;.remote</code>
1571 are consulted, and then they are mapped via <code>remote.&lt;remote&gt;.fetch</code>
Junio C Hamanoa1295452012-11-13 22:32:041572 to their corresponding remote-tracking branches, and the tips of
Junio C Hamanoa03ac862011-04-02 04:32:291573 these tracking branches are merged.
1574</p>
1575</dd>
1576<dt class="hdlist1">
Junio C Hamano3d050d62011-05-17 06:43:341577merge.ff
1578</dt>
1579<dd>
1580<p>
Junio C Hamano076ffcc2013-02-06 05:13:211581 By default, Git does not create an extra merge commit when merging
Junio C Hamano3d050d62011-05-17 06:43:341582 a commit that is a descendant of the current commit. Instead, the
Junio C Hamano9d971152012-12-19 00:43:111583 tip of the current branch is fast-forwarded. When set to <code>false</code>,
Junio C Hamano076ffcc2013-02-06 05:13:211584 this variable tells Git to create an extra merge commit in such
Junio C Hamano9d971152012-12-19 00:43:111585 a case (equivalent to giving the <code>--no-ff</code> option from the command
1586 line). When set to <code>only</code>, only such fast-forward merges are
1587 allowed (equivalent to giving the <code>--ff-only</code> option from the
Junio C Hamano3d050d62011-05-17 06:43:341588 command line).
1589</p>
1590</dd>
1591<dt class="hdlist1">
Junio C Hamano6d76d612008-05-09 05:46:081592merge.log
1593</dt>
1594<dd>
1595<p>
Junio C Hamano3b4609d2010-09-30 00:04:341596 In addition to branch names, populate the log message with at
1597 most the specified number of one-line descriptions from the
1598 actual commits that are being merged. Defaults to false, and
Junio C Hamano7165bf72011-01-04 22:06:181599 true is a synonym for 20.
Junio C Hamano6d76d612008-05-09 05:46:081600</p>
1601</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591602<dt class="hdlist1">
Junio C Hamano2fbcd212008-05-14 22:26:071603merge.renameLimit
1604</dt>
1605<dd>
1606<p>
1607 The number of files to consider when performing rename detection
1608 during a merge; if not specified, defaults to the value of
1609 diff.renameLimit.
1610</p>
1611</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591612<dt class="hdlist1">
Junio C Hamano2db3e752010-09-03 21:33:061613merge.renormalize
1614</dt>
1615<dd>
1616<p>
Junio C Hamano076ffcc2013-02-06 05:13:211617 Tell Git that canonical representation of files in the
Junio C Hamano2db3e752010-09-03 21:33:061618 repository has changed over time (e.g. earlier commits record
1619 text files with CRLF line endings, but recent ones use LF line
Junio C Hamano076ffcc2013-02-06 05:13:211620 endings). In such a repository, Git can convert the data
Junio C Hamano2db3e752010-09-03 21:33:061621 recorded in commits to a canonical form before performing a
1622 merge to reduce unnecessary conflicts. For more information,
1623 see section "Merging branches with differing checkin/checkout
Junio C Hamanoa28a9202012-06-21 07:08:231624 attributes" in <a href="gitattributes.html">gitattributes(5)</a>.
Junio C Hamano2db3e752010-09-03 21:33:061625</p>
1626</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591627<dt class="hdlist1">
Junio C Hamano4653c6f2008-11-26 22:50:201628merge.stat
1629</dt>
1630<dd>
1631<p>
1632 Whether to print the diffstat between ORIG_HEAD and the merge result
1633 at the end of the merge. True by default.
1634</p>
1635</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591636<dt class="hdlist1">
Junio C Hamano6d76d612008-05-09 05:46:081637merge.tool
1638</dt>
1639<dd>
1640<p>
Junio C Hamanob5e079f2013-02-08 00:02:521641 Controls which merge tool is used by <a href="git-mergetool.html">git-mergetool(1)</a>.
1642 The list below shows the valid built-in values.
1643 Any other value is treated as a custom merge tool and requires
1644 that a corresponding mergetool.&lt;tool&gt;.cmd variable is defined.
Junio C Hamano1e6e0062007-07-13 05:33:251645</p>
Junio C Hamanob5e079f2013-02-08 00:02:521646<div class="ulist"><ul>
1647<li>
1648<p>
1649araxis
1650</p>
1651</li>
1652<li>
1653<p>
1654bc3
1655</p>
1656</li>
1657<li>
1658<p>
1659codecompare
1660</p>
1661</li>
1662<li>
1663<p>
1664deltawalker
1665</p>
1666</li>
1667<li>
1668<p>
Junio C Hamano369e3402013-10-15 18:40:251669diffmerge
1670</p>
1671</li>
1672<li>
1673<p>
Junio C Hamanob5e079f2013-02-08 00:02:521674diffuse
1675</p>
1676</li>
1677<li>
1678<p>
1679ecmerge
1680</p>
1681</li>
1682<li>
1683<p>
1684emerge
1685</p>
1686</li>
1687<li>
1688<p>
1689gvimdiff
1690</p>
1691</li>
1692<li>
1693<p>
1694gvimdiff2
1695</p>
1696</li>
1697<li>
1698<p>
1699kdiff3
1700</p>
1701</li>
1702<li>
1703<p>
1704meld
1705</p>
1706</li>
1707<li>
1708<p>
1709opendiff
1710</p>
1711</li>
1712<li>
1713<p>
1714p4merge
1715</p>
1716</li>
1717<li>
1718<p>
1719tkdiff
1720</p>
1721</li>
1722<li>
1723<p>
1724tortoisemerge
1725</p>
1726</li>
1727<li>
1728<p>
1729vimdiff
1730</p>
1731</li>
1732<li>
1733<p>
1734vimdiff2
1735</p>
1736</li>
1737<li>
1738<p>
1739xxdiff
1740</p>
1741</li>
1742</ul></div>
Junio C Hamano1e6e0062007-07-13 05:33:251743</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591744<dt class="hdlist1">
Junio C Hamano1e6e0062007-07-13 05:33:251745merge.verbosity
1746</dt>
1747<dd>
1748<p>
1749 Controls the amount of output shown by the recursive merge
1750 strategy. Level 0 outputs nothing except a final error
1751 message if conflicts were detected. Level 1 outputs only
1752 conflicts, 2 outputs conflicts and file changes. Level 5 and
1753 above outputs debugging information. The default is level 2.
Junio C Hamanoec87f522008-12-10 08:35:251754 Can be overridden by the <em>GIT_MERGE_VERBOSITY</em> environment variable.
Junio C Hamano1e6e0062007-07-13 05:33:251755</p>
1756</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591757<dt class="hdlist1">
Junio C Hamano6d76d612008-05-09 05:46:081758merge.&lt;driver&gt;.name
1759</dt>
1760<dd>
1761<p>
Junio C Hamanoec87f522008-12-10 08:35:251762 Defines a human-readable name for a custom low-level
Junio C Hamanoa28a9202012-06-21 07:08:231763 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.
Junio C Hamano6d76d612008-05-09 05:46:081764</p>
1765</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591766<dt class="hdlist1">
Junio C Hamano6d76d612008-05-09 05:46:081767merge.&lt;driver&gt;.driver
1768</dt>
1769<dd>
1770<p>
1771 Defines the command that implements a custom low-level
Junio C Hamanoa28a9202012-06-21 07:08:231772 merge driver. See <a href="gitattributes.html">gitattributes(5)</a> for details.
Junio C Hamano6d76d612008-05-09 05:46:081773</p>
1774</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591775<dt class="hdlist1">
Junio C Hamano6d76d612008-05-09 05:46:081776merge.&lt;driver&gt;.recursive
1777</dt>
1778<dd>
1779<p>
1780 Names a low-level merge driver to be used when
1781 performing an internal merge between common ancestors.
Junio C Hamanoa28a9202012-06-21 07:08:231782 See <a href="gitattributes.html">gitattributes(5)</a> for details.
Junio C Hamano6d76d612008-05-09 05:46:081783</p>
1784</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591785<dt class="hdlist1">
Junio C Hamano1b50ce92007-10-03 12:05:531786branch.&lt;name&gt;.mergeoptions
1787</dt>
1788<dd>
1789<p>
1790 Sets default options for merging into branch &lt;name&gt;. The syntax and
Junio C Hamanoc0e55e72009-10-10 00:56:291791 supported options are the same as those of <em>git merge</em>, but option
1792 values containing whitespace characters are currently not supported.
Junio C Hamano1b50ce92007-10-03 12:05:531793</p>
1794</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311795</dl></div>
Junio C Hamano1e6e0062007-07-13 05:33:251796</div>
Junio C Hamano9d971152012-12-19 00:43:111797</div>
1798<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311799<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231800<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231801<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>,
1802<a href="gitattributes.html">gitattributes(5)</a>,
1803<a href="git-reset.html">git-reset(1)</a>,
1804<a href="git-diff.html">git-diff(1)</a>, <a href="git-ls-files.html">git-ls-files(1)</a>,
1805<a href="git-add.html">git-add(1)</a>, <a href="git-rm.html">git-rm(1)</a>,
1806<a href="git-mergetool.html">git-mergetool(1)</a></p></div>
Junio C Hamanofa2ad882009-12-03 09:15:441807</div>
Junio C Hamano9d971152012-12-19 00:43:111808</div>
1809<div class="sect1">
Junio C Hamanofa2ad882009-12-03 09:15:441810<h2 id="_git">GIT</h2>
1811<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231812<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamanofa2ad882009-12-03 09:15:441813</div>
Junio C Hamano7bd050f2011-09-22 06:32:221814</div>
Junio C Hamano9d971152012-12-19 00:43:111815</div>
Junio C Hamano7bd050f2011-09-22 06:32:221816<div id="footnotes"><hr /></div>
Junio C Hamanofa2ad882009-12-03 09:15:441817<div id="footer">
1818<div id="footer-text">
Junio C Hamanoaef76442013-10-18 22:11:271819Last updated 2013-10-18 15:11:10 PDT
Junio C Hamanofa2ad882009-12-03 09:15:441820</div>
1821</div>
1822</body>
1823</html>