blob: ad5a8b10a92a4181925cc2797b58255923ccb163 [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" />
Junio C Hamanoc14e6ad2014-10-31 20:25:536<meta name="generator" content="AsciiDoc 8.6.9" />
Junio C Hamano68cf15a2010-11-06 01:01:597<title>git-pull(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 Hamanoc14e6ad2014-10-31 20:25:5390.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}
Junio C Hamanoc14e6ad2014-10-31 20:25:5397pre {
98 white-space: pre-wrap;
99}
Junio C Hamano1a4e8412005-12-27 08:17:23100
Junio C Hamano9d971152012-12-19 00:43:11101#author {
Junio C Hamano1a4e8412005-12-27 08:17:23102 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23103 font-weight: bold;
Junio C Hamanoba4b9282008-07-06 05:20:31104 font-size: 1.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23105}
Junio C Hamano9d971152012-12-19 00:43:11106#email {
Junio C Hamano1a4e8412005-12-27 08:17:23107}
Junio C Hamano9d971152012-12-19 00:43:11108#revnumber, #revdate, #revremark {
Junio C Hamano1a4e8412005-12-27 08:17:23109}
110
Junio C Hamano9d971152012-12-19 00:43:11111#footer {
Junio C Hamano1a4e8412005-12-27 08:17:23112 font-size: small;
113 border-top: 2px solid silver;
114 padding-top: 0.5em;
115 margin-top: 4.0em;
116}
Junio C Hamano9d971152012-12-19 00:43:11117#footer-text {
Junio C Hamano1a4e8412005-12-27 08:17:23118 float: left;
119 padding-bottom: 0.5em;
120}
Junio C Hamano9d971152012-12-19 00:43:11121#footer-badges {
Junio C Hamano1a4e8412005-12-27 08:17:23122 float: right;
123 padding-bottom: 0.5em;
124}
125
Junio C Hamano9d971152012-12-19 00:43:11126#preamble {
Junio C Hamano68cf15a2010-11-06 01:01:59127 margin-top: 1.5em;
128 margin-bottom: 1.5em;
129}
Junio C Hamano9d971152012-12-19 00:43:11130div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamano1a4e8412005-12-27 08:17:23131div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
132div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22133 margin-top: 1.0em;
Junio C Hamano1a4e8412005-12-27 08:17:23134 margin-bottom: 1.5em;
135}
136div.admonitionblock {
Junio C Hamano7bd050f2011-09-22 06:32:22137 margin-top: 2.0em;
138 margin-bottom: 2.0em;
139 margin-right: 10%;
140 color: #606060;
Junio C Hamano1a4e8412005-12-27 08:17:23141}
142
143div.content { /* Block element content. */
144 padding: 0;
145}
146
147/* Block element titles. */
148div.title, caption.title {
Junio C Hamano68cf15a2010-11-06 01:01:59149 color: #527bbd;
Junio C Hamano1a4e8412005-12-27 08:17:23150 font-weight: bold;
151 text-align: left;
152 margin-top: 1.0em;
153 margin-bottom: 0.5em;
154}
155div.title + * {
156 margin-top: 0;
157}
158
159td div.title:first-child {
160 margin-top: 0.0em;
161}
162div.content div.title:first-child {
163 margin-top: 0.0em;
164}
165div.content + div.title {
166 margin-top: 0.0em;
167}
168
169div.sidebarblock > div.content {
170 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11171 border: 1px solid #dddddd;
172 border-left: 4px solid #f0f0f0;
Junio C Hamano1a4e8412005-12-27 08:17:23173 padding: 0.5em;
174}
175
176div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11177 border: 1px solid #dddddd;
178 border-left: 5px solid #f0f0f0;
179 background: #f8f8f8;
Junio C Hamano1a4e8412005-12-27 08:17:23180 padding: 0.5em;
181}
182
Junio C Hamano7bd050f2011-09-22 06:32:22183div.quoteblock, div.verseblock {
184 padding-left: 1.0em;
185 margin-left: 1.0em;
Junio C Hamano68cf15a2010-11-06 01:01:59186 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11187 border-left: 5px solid #f0f0f0;
188 color: #888;
Junio C Hamano1a4e8412005-12-27 08:17:23189}
Junio C Hamano7bd050f2011-09-22 06:32:22190
Junio C Hamano68cf15a2010-11-06 01:01:59191div.quoteblock > div.attribution {
192 padding-top: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23193 text-align: right;
194}
Junio C Hamano68cf15a2010-11-06 01:01:59195
Junio C Hamano9d971152012-12-19 00:43:11196div.verseblock > pre.content {
197 font-family: inherit;
198 font-size: inherit;
Junio C Hamano68cf15a2010-11-06 01:01:59199}
200div.verseblock > div.attribution {
201 padding-top: 0.75em;
202 text-align: left;
203}
204/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
Junio C Hamanoba4b9282008-07-06 05:20:31205div.verseblock + div.attribution {
206 text-align: left;
207}
Junio C Hamano1a4e8412005-12-27 08:17:23208
209div.admonitionblock .icon {
210 vertical-align: top;
211 font-size: 1.1em;
212 font-weight: bold;
213 text-decoration: underline;
214 color: #527bbd;
215 padding-right: 0.5em;
216}
217div.admonitionblock td.content {
218 padding-left: 0.5em;
Junio C Hamano7bd050f2011-09-22 06:32:22219 border-left: 3px solid #dddddd;
Junio C Hamano1a4e8412005-12-27 08:17:23220}
221
222div.exampleblock > div.content {
Junio C Hamano7bd050f2011-09-22 06:32:22223 border-left: 3px solid #dddddd;
224 padding-left: 0.5em;
Junio C Hamano1a4e8412005-12-27 08:17:23225}
226
Junio C Hamano1a4e8412005-12-27 08:17:23227div.imageblock div.content { padding-left: 0; }
Junio C Hamanoc14e6ad2014-10-31 20:25:53228span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamano68cf15a2010-11-06 01:01:59229a.image:visited { color: white; }
Junio C Hamano1a4e8412005-12-27 08:17:23230
231dl {
232 margin-top: 0.8em;
233 margin-bottom: 0.8em;
234}
235dt {
236 margin-top: 0.5em;
237 margin-bottom: 0;
Junio C Hamano68cf15a2010-11-06 01:01:59238 font-style: normal;
239 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23240}
241dd > *:first-child {
Junio C Hamano68cf15a2010-11-06 01:01:59242 margin-top: 0.1em;
Junio C Hamano1a4e8412005-12-27 08:17:23243}
244
245ul, ol {
246 list-style-position: outside;
247}
Junio C Hamano68cf15a2010-11-06 01:01:59248ol.arabic {
249 list-style-type: decimal;
250}
251ol.loweralpha {
Junio C Hamano1a4e8412005-12-27 08:17:23252 list-style-type: lower-alpha;
253}
Junio C Hamano68cf15a2010-11-06 01:01:59254ol.upperalpha {
255 list-style-type: upper-alpha;
256}
257ol.lowerroman {
258 list-style-type: lower-roman;
259}
260ol.upperroman {
261 list-style-type: upper-roman;
262}
263
264div.compact ul, div.compact ol,
265div.compact p, div.compact p,
266div.compact div, div.compact div {
267 margin-top: 0.1em;
268 margin-bottom: 0.1em;
269}
Junio C Hamano1a4e8412005-12-27 08:17:23270
Junio C Hamano1a4e8412005-12-27 08:17:23271tfoot {
272 font-weight: bold;
273}
Junio C Hamano68cf15a2010-11-06 01:01:59274td > div.verse {
275 white-space: pre;
276}
Junio C Hamano68cf15a2010-11-06 01:01:59277
278div.hdlist {
Junio C Hamano1a4e8412005-12-27 08:17:23279 margin-top: 0.8em;
280 margin-bottom: 0.8em;
281}
Junio C Hamano68cf15a2010-11-06 01:01:59282div.hdlist tr {
283 padding-bottom: 15px;
Junio C Hamanoba4b9282008-07-06 05:20:31284}
Junio C Hamano68cf15a2010-11-06 01:01:59285dt.hdlist1.strong, td.hdlist1.strong {
286 font-weight: bold;
287}
288td.hdlist1 {
Junio C Hamano1a4e8412005-12-27 08:17:23289 vertical-align: top;
Junio C Hamano68cf15a2010-11-06 01:01:59290 font-style: normal;
Junio C Hamano1a4e8412005-12-27 08:17:23291 padding-right: 0.8em;
Junio C Hamano68cf15a2010-11-06 01:01:59292 color: navy;
Junio C Hamano1a4e8412005-12-27 08:17:23293}
Junio C Hamano68cf15a2010-11-06 01:01:59294td.hdlist2 {
Junio C Hamano1a4e8412005-12-27 08:17:23295 vertical-align: top;
296}
Junio C Hamano68cf15a2010-11-06 01:01:59297div.hdlist.compact tr {
298 margin: 0;
299 padding-bottom: 0;
300}
301
302.comment {
303 background: yellow;
304}
Junio C Hamano1a4e8412005-12-27 08:17:23305
Junio C Hamano7bd050f2011-09-22 06:32:22306.footnote, .footnoteref {
307 font-size: 0.8em;
308}
309
310span.footnote, span.footnoteref {
311 vertical-align: super;
312}
313
314#footnotes {
315 margin: 20px 0 20px 0;
316 padding: 7px 0 0 0;
317}
318
319#footnotes div.footnote {
320 margin: 0 0 5px 0;
321}
322
323#footnotes hr {
324 border: none;
325 border-top: 1px solid silver;
326 height: 1px;
327 text-align: left;
328 margin-left: 0;
329 width: 20%;
330 min-width: 100px;
331}
332
Junio C Hamano9d971152012-12-19 00:43:11333div.colist td {
334 padding-right: 0.5em;
335 padding-bottom: 0.3em;
336 vertical-align: top;
337}
338div.colist td img {
339 margin-top: 0.3em;
Junio C Hamano1a4e8412005-12-27 08:17:23340}
Junio C Hamanoba4b9282008-07-06 05:20:31341
Junio C Hamano9d971152012-12-19 00:43:11342@media print {
343 #footer-badges { display: none; }
344}
345
346#toc {
Junio C Hamano7bd050f2011-09-22 06:32:22347 margin-bottom: 2.5em;
348}
349
Junio C Hamano9d971152012-12-19 00:43:11350#toctitle {
Junio C Hamanoba4b9282008-07-06 05:20:31351 color: #527bbd;
Junio C Hamanoba4b9282008-07-06 05:20:31352 font-size: 1.1em;
353 font-weight: bold;
354 margin-top: 1.0em;
355 margin-bottom: 0.1em;
356}
357
Junio C Hamanoc14e6ad2014-10-31 20:25:53358div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanoba4b9282008-07-06 05:20:31359 margin-top: 0;
360 margin-bottom: 0;
361}
362div.toclevel2 {
363 margin-left: 2em;
364 font-size: 0.9em;
365}
366div.toclevel3 {
367 margin-left: 4em;
368 font-size: 0.9em;
369}
370div.toclevel4 {
371 margin-left: 6em;
372 font-size: 0.9em;
373}
Junio C Hamano9d971152012-12-19 00:43:11374
375span.aqua { color: aqua; }
376span.black { color: black; }
377span.blue { color: blue; }
378span.fuchsia { color: fuchsia; }
379span.gray { color: gray; }
380span.green { color: green; }
381span.lime { color: lime; }
382span.maroon { color: maroon; }
383span.navy { color: navy; }
384span.olive { color: olive; }
385span.purple { color: purple; }
386span.red { color: red; }
387span.silver { color: silver; }
388span.teal { color: teal; }
389span.white { color: white; }
390span.yellow { color: yellow; }
391
392span.aqua-background { background: aqua; }
393span.black-background { background: black; }
394span.blue-background { background: blue; }
395span.fuchsia-background { background: fuchsia; }
396span.gray-background { background: gray; }
397span.green-background { background: green; }
398span.lime-background { background: lime; }
399span.maroon-background { background: maroon; }
400span.navy-background { background: navy; }
401span.olive-background { background: olive; }
402span.purple-background { background: purple; }
403span.red-background { background: red; }
404span.silver-background { background: silver; }
405span.teal-background { background: teal; }
406span.white-background { background: white; }
407span.yellow-background { background: yellow; }
408
409span.big { font-size: 2em; }
410span.small { font-size: 0.6em; }
411
412span.underline { text-decoration: underline; }
413span.overline { text-decoration: overline; }
414span.line-through { text-decoration: line-through; }
415
Junio C Hamanoc14e6ad2014-10-31 20:25:53416div.unbreakable { page-break-inside: avoid; }
417
Junio C Hamano9d971152012-12-19 00:43:11418
419/*
420 * xhtml11 specific
421 *
422 * */
423
424div.tableblock {
425 margin-top: 1.0em;
426 margin-bottom: 1.5em;
427}
428div.tableblock > table {
429 border: 3px solid #527bbd;
430}
431thead, p.table.header {
432 font-weight: bold;
433 color: #527bbd;
434}
435p.table {
436 margin-top: 0;
437}
438/* Because the table frame attribute is overriden by CSS in most browsers. */
439div.tableblock > table[frame="void"] {
440 border-style: none;
441}
442div.tableblock > table[frame="hsides"] {
443 border-left-style: none;
444 border-right-style: none;
445}
446div.tableblock > table[frame="vsides"] {
447 border-top-style: none;
448 border-bottom-style: none;
449}
450
451
452/*
453 * html5 specific
454 *
455 * */
456
457table.tableblock {
458 margin-top: 1.0em;
459 margin-bottom: 1.5em;
460}
461thead, p.tableblock.header {
462 font-weight: bold;
463 color: #527bbd;
464}
465p.tableblock {
466 margin-top: 0;
467}
468table.tableblock {
469 border-width: 3px;
470 border-spacing: 0px;
471 border-style: solid;
472 border-color: #527bbd;
473 border-collapse: collapse;
474}
475th.tableblock, td.tableblock {
476 border-width: 1px;
477 padding: 4px;
478 border-style: solid;
479 border-color: #527bbd;
480}
481
482table.tableblock.frame-topbot {
483 border-left-style: hidden;
484 border-right-style: hidden;
485}
486table.tableblock.frame-sides {
487 border-top-style: hidden;
488 border-bottom-style: hidden;
489}
490table.tableblock.frame-none {
491 border-style: hidden;
492}
493
494th.tableblock.halign-left, td.tableblock.halign-left {
495 text-align: left;
496}
497th.tableblock.halign-center, td.tableblock.halign-center {
498 text-align: center;
499}
500th.tableblock.halign-right, td.tableblock.halign-right {
501 text-align: right;
502}
503
504th.tableblock.valign-top, td.tableblock.valign-top {
505 vertical-align: top;
506}
507th.tableblock.valign-middle, td.tableblock.valign-middle {
508 vertical-align: middle;
509}
510th.tableblock.valign-bottom, td.tableblock.valign-bottom {
511 vertical-align: bottom;
512}
513
514
515/*
516 * manpage specific
517 *
518 * */
519
520body.manpage h1 {
Junio C Hamano68cf15a2010-11-06 01:01:59521 padding-top: 0.5em;
522 padding-bottom: 0.5em;
523 border-top: 2px solid silver;
524 border-bottom: 2px solid silver;
525}
Junio C Hamano9d971152012-12-19 00:43:11526body.manpage h2 {
Junio C Hamano68cf15a2010-11-06 01:01:59527 border-style: none;
528}
Junio C Hamano9d971152012-12-19 00:43:11529body.manpage div.sectionbody {
530 margin-left: 3em;
Junio C Hamano68cf15a2010-11-06 01:01:59531}
532
533@media print {
Junio C Hamano9d971152012-12-19 00:43:11534 body.manpage div#toc { display: none; }
Junio C Hamano68cf15a2010-11-06 01:01:59535}
Junio C Hamanoc14e6ad2014-10-31 20:25:53536
537
Junio C Hamano1a4e8412005-12-27 08:17:23538</style>
Junio C Hamano7bd050f2011-09-22 06:32:22539<script type="text/javascript">
540/*<![CDATA[*/
Junio C Hamano7bd050f2011-09-22 06:32:22541var asciidoc = { // Namespace.
542
543/////////////////////////////////////////////////////////////////////
544// Table Of Contents generator
545/////////////////////////////////////////////////////////////////////
546
547/* Author: Mihai Bazon, September 2002
548 * http://students.infoiasi.ro/~mishoo
549 *
550 * Table Of Content generator
551 * Version: 0.4
552 *
553 * Feel free to use this script under the terms of the GNU General Public
554 * License, as long as you do not remove or alter this notice.
555 */
556
557 /* modified by Troy D. Hanson, September 2006. License: GPL */
558 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
559
560// toclevels = 1..4.
561toc: function (toclevels) {
562
563 function getText(el) {
564 var text = "";
565 for (var i = el.firstChild; i != null; i = i.nextSibling) {
566 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
567 text += i.data;
568 else if (i.firstChild != null)
569 text += getText(i);
570 }
571 return text;
572 }
573
574 function TocEntry(el, text, toclevel) {
575 this.element = el;
576 this.text = text;
577 this.toclevel = toclevel;
578 }
579
580 function tocEntries(el, toclevels) {
581 var result = new Array;
Junio C Hamanoc14e6ad2014-10-31 20:25:53582 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
Junio C Hamano7bd050f2011-09-22 06:32:22583 // Function that scans the DOM tree for header elements (the DOM2
584 // nodeIterator API would be a better technique but not supported by all
585 // browsers).
586 var iterate = function (el) {
587 for (var i = el.firstChild; i != null; i = i.nextSibling) {
588 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
589 var mo = re.exec(i.tagName);
590 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
591 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
592 }
593 iterate(i);
594 }
595 }
596 }
597 iterate(el);
598 return result;
599 }
600
601 var toc = document.getElementById("toc");
Junio C Hamano9d971152012-12-19 00:43:11602 if (!toc) {
603 return;
604 }
605
606 // Delete existing TOC entries in case we're reloading the TOC.
607 var tocEntriesToRemove = [];
608 var i;
609 for (i = 0; i < toc.childNodes.length; i++) {
610 var entry = toc.childNodes[i];
Junio C Hamanoc14e6ad2014-10-31 20:25:53611 if (entry.nodeName.toLowerCase() == 'div'
Junio C Hamano9d971152012-12-19 00:43:11612 && entry.getAttribute("class")
613 && entry.getAttribute("class").match(/^toclevel/))
614 tocEntriesToRemove.push(entry);
615 }
616 for (i = 0; i < tocEntriesToRemove.length; i++) {
617 toc.removeChild(tocEntriesToRemove[i]);
618 }
619
620 // Rebuild TOC entries.
Junio C Hamano7bd050f2011-09-22 06:32:22621 var entries = tocEntries(document.getElementById("content"), toclevels);
622 for (var i = 0; i < entries.length; ++i) {
623 var entry = entries[i];
624 if (entry.element.id == "")
625 entry.element.id = "_toc_" + i;
626 var a = document.createElement("a");
627 a.href = "#" + entry.element.id;
628 a.appendChild(document.createTextNode(entry.text));
629 var div = document.createElement("div");
630 div.appendChild(a);
631 div.className = "toclevel" + entry.toclevel;
632 toc.appendChild(div);
633 }
634 if (entries.length == 0)
635 toc.parentNode.removeChild(toc);
636},
637
638
639/////////////////////////////////////////////////////////////////////
640// Footnotes generator
641/////////////////////////////////////////////////////////////////////
642
643/* Based on footnote generation code from:
644 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
645 */
646
647footnotes: function () {
Junio C Hamano9d971152012-12-19 00:43:11648 // Delete existing footnote entries in case we're reloading the footnodes.
649 var i;
Junio C Hamano7bd050f2011-09-22 06:32:22650 var noteholder = document.getElementById("footnotes");
Junio C Hamano9d971152012-12-19 00:43:11651 if (!noteholder) {
652 return;
653 }
654 var entriesToRemove = [];
655 for (i = 0; i < noteholder.childNodes.length; i++) {
656 var entry = noteholder.childNodes[i];
Junio C Hamanoc14e6ad2014-10-31 20:25:53657 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
Junio C Hamano9d971152012-12-19 00:43:11658 entriesToRemove.push(entry);
659 }
660 for (i = 0; i < entriesToRemove.length; i++) {
661 noteholder.removeChild(entriesToRemove[i]);
662 }
663
664 // Rebuild footnote entries.
665 var cont = document.getElementById("content");
Junio C Hamano7bd050f2011-09-22 06:32:22666 var spans = cont.getElementsByTagName("span");
667 var refs = {};
668 var n = 0;
669 for (i=0; i<spans.length; i++) {
670 if (spans[i].className == "footnote") {
671 n++;
Junio C Hamano9d971152012-12-19 00:43:11672 var note = spans[i].getAttribute("data-note");
673 if (!note) {
674 // Use [\s\S] in place of . so multi-line matches work.
675 // Because JavaScript has no s (dotall) regex flag.
676 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
677 spans[i].innerHTML =
678 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
679 "' title='View footnote' class='footnote'>" + n + "</a>]";
680 spans[i].setAttribute("data-note", note);
681 }
Junio C Hamano7bd050f2011-09-22 06:32:22682 noteholder.innerHTML +=
683 "<div class='footnote' id='_footnote_" + n + "'>" +
684 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
685 n + "</a>. " + note + "</div>";
Junio C Hamano7bd050f2011-09-22 06:32:22686 var id =spans[i].getAttribute("id");
687 if (id != null) refs["#"+id] = n;
688 }
689 }
690 if (n == 0)
691 noteholder.parentNode.removeChild(noteholder);
692 else {
693 // Process footnoterefs.
694 for (i=0; i<spans.length; i++) {
695 if (spans[i].className == "footnoteref") {
696 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
697 href = href.match(/#.*/)[0]; // Because IE return full URL.
698 n = refs[href];
699 spans[i].innerHTML =
700 "[<a href='#_footnote_" + n +
701 "' title='View footnote' class='footnote'>" + n + "</a>]";
702 }
703 }
704 }
Junio C Hamano9d971152012-12-19 00:43:11705},
706
707install: function(toclevels) {
708 var timerId;
709
710 function reinstall() {
711 asciidoc.footnotes();
712 if (toclevels) {
713 asciidoc.toc(toclevels);
714 }
715 }
716
717 function reinstallAndRemoveTimer() {
718 clearInterval(timerId);
719 reinstall();
720 }
721
722 timerId = setInterval(reinstall, 500);
723 if (document.addEventListener)
724 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
725 else
726 window.onload = reinstallAndRemoveTimer;
Junio C Hamano7bd050f2011-09-22 06:32:22727}
728
729}
Junio C Hamano9d971152012-12-19 00:43:11730asciidoc.install();
Junio C Hamano7bd050f2011-09-22 06:32:22731/*]]>*/
732</script>
Junio C Hamano1a4e8412005-12-27 08:17:23733</head>
Junio C Hamano9d971152012-12-19 00:43:11734<body class="manpage">
Junio C Hamano1a4e8412005-12-27 08:17:23735<div id="header">
736<h1>
737git-pull(1) Manual Page
738</h1>
739<h2>NAME</h2>
740<div class="sectionbody">
741<p>git-pull -
Junio C Hamano8401f142013-07-12 22:47:46742 Fetch from and integrate with another repository or a local branch
Junio C Hamano1a4e8412005-12-27 08:17:23743</p>
744</div>
745</div>
Junio C Hamano7bd050f2011-09-22 06:32:22746<div id="content">
Junio C Hamano9d971152012-12-19 00:43:11747<div class="sect1">
Junio C Hamano68cf15a2010-11-06 01:01:59748<h2 id="_synopsis">SYNOPSIS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23749<div class="sectionbody">
Junio C Hamano15567bc2011-07-23 00:51:59750<div class="verseblock">
Junio C Hamano9d971152012-12-19 00:43:11751<pre class="content"><em>git pull</em> [options] [&lt;repository&gt; [&lt;refspec&gt;&#8230;]]</pre>
752<div class="attribution">
Junio C Hamano15567bc2011-07-23 00:51:59753</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:23754</div>
Junio C Hamano9d971152012-12-19 00:43:11755</div>
756<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31757<h2 id="_description">DESCRIPTION</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23758<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59759<div class="paragraph"><p>Incorporates changes from a remote repository into the current
Junio C Hamanoc14e6ad2014-10-31 20:25:53760branch. In its default mode, <code>git pull</code> is shorthand for
761<code>git fetch</code> followed by <code>git merge FETCH_HEAD</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59762<div class="paragraph"><p>More precisely, <em>git pull</em> runs <em>git fetch</em> with the given
Junio C Hamanob5a296f2010-08-13 02:46:36763parameters and calls <em>git merge</em> to merge the retrieved branch
764heads into the current branch.
Junio C Hamanoc14e6ad2014-10-31 20:25:53765With <code>--rebase</code>, it runs <em>git rebase</em> instead of <em>git merge</em>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59766<div class="paragraph"><p>&lt;repository&gt; should be the name of a remote repository as
Junio C Hamanoa28a9202012-06-21 07:08:23767passed to <a href="git-fetch.html">git-fetch(1)</a>. &lt;refspec&gt; can name an
Junio C Hamanob5a296f2010-08-13 02:46:36768arbitrary remote ref (for example, the name of a tag) or even
Junio C Hamano97bcb482010-11-25 03:16:07769a collection of refs with corresponding remote-tracking branches
Junio C Hamano2e6ded82010-12-05 06:20:48770(e.g., refs/heads/&#42;:refs/remotes/origin/&#42;),
771but usually it is the name of a branch in the remote repository.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59772<div class="paragraph"><p>Default values for &lt;repository&gt; and &lt;branch&gt; are read from the
Junio C Hamanob5a296f2010-08-13 02:46:36773"remote" and "merge" configuration for the current branch
Junio C Hamanoc14e6ad2014-10-31 20:25:53774as set by <a href="git-branch.html">git-branch(1)</a> <code>--track</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59775<div class="paragraph"><p>Assume the following history exists and the current branch is
Junio C Hamanoc14e6ad2014-10-31 20:25:53776"<code>master</code>":</p></div>
Junio C Hamanob5a296f2010-08-13 02:46:36777<div class="listingblock">
778<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53779<pre><code> A---B---C master on origin
Junio C Hamanob5a296f2010-08-13 02:46:36780 /
Junio C Hamano92fb9522013-11-06 23:55:19781 D---E---F---G master
782 ^
Junio C Hamanoc14e6ad2014-10-31 20:25:53783 origin/master in your repository</code></pre>
Junio C Hamanob5a296f2010-08-13 02:46:36784</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:53785<div class="paragraph"><p>Then "<code>git pull</code>" will fetch and replay the changes from the remote
786<code>master</code> branch since it diverged from the local <code>master</code> (i.e., <code>E</code>)
787until its current commit (<code>C</code>) on top of <code>master</code> and record the
Junio C Hamanob5a296f2010-08-13 02:46:36788result in a new commit along with the names of the two parent commits
789and a log message from the user describing the changes.</p></div>
790<div class="listingblock">
791<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53792<pre><code> A---B---C origin/master
Junio C Hamanob5a296f2010-08-13 02:46:36793 / \
Junio C Hamanoc14e6ad2014-10-31 20:25:53794 D---E---F---G---H master</code></pre>
Junio C Hamanob5a296f2010-08-13 02:46:36795</div></div>
Junio C Hamanoa28a9202012-06-21 07:08:23796<div class="paragraph"><p>See <a href="git-merge.html">git-merge(1)</a> for details, including how conflicts
Junio C Hamanob5a296f2010-08-13 02:46:36797are presented and handled.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:21798<div class="paragraph"><p>In Git 1.7.0 or later, to cancel a conflicting merge, use
Junio C Hamanoc14e6ad2014-10-31 20:25:53799<code>git reset --merge</code>. <strong>Warning</strong>: In older versions of Git, running <em>git pull</em>
Junio C Hamano1aa40d22010-01-21 17:46:43800with uncommitted changes is discouraged: while possible, it leaves you
Junio C Hamanob5a296f2010-08-13 02:46:36801in a state that may be hard to back out of in the case of a conflict.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:59802<div class="paragraph"><p>If any of the remote changes overlap with local uncommitted changes,
Junio C Hamanob5a296f2010-08-13 02:46:36803the merge will be automatically cancelled and the work tree untouched.
804It is generally best to get any local changes in working order before
Junio C Hamanoa28a9202012-06-21 07:08:23805pulling or stash them away with <a href="git-stash.html">git-stash(1)</a>.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:23806</div>
Junio C Hamano9d971152012-12-19 00:43:11807</div>
808<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:31809<h2 id="_options">OPTIONS</h2>
Junio C Hamano1a4e8412005-12-27 08:17:23810<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:59811<div class="dlist"><dl>
812<dt class="hdlist1">
Junio C Hamanoea90ab32010-03-15 20:32:55813-q
814</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59815<dt class="hdlist1">
Junio C Hamanoea90ab32010-03-15 20:32:55816--quiet
817</dt>
818<dd>
819<p>
820 This is passed to both underlying git-fetch to squelch reporting of
821 during transfer, and underlying git-merge to squelch output during
822 merging.
823</p>
824</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59825<dt class="hdlist1">
Junio C Hamanoea90ab32010-03-15 20:32:55826-v
827</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59828<dt class="hdlist1">
Junio C Hamanoea90ab32010-03-15 20:32:55829--verbose
830</dt>
831<dd>
832<p>
833 Pass --verbose to git-fetch and git-merge.
834</p>
835</dd>
Junio C Hamanoe6116832011-02-08 00:49:45836<dt class="hdlist1">
Junio C Hamano5cd15182011-04-05 00:21:10837--[no-]recurse-submodules[=yes|on-demand|no]
Junio C Hamanoe6116832011-02-08 00:49:45838</dt>
839<dd>
840<p>
841 This option controls if new commits of all populated submodules should
Junio C Hamanoa28a9202012-06-21 07:08:23842 be fetched too (see <a href="git-config.html">git-config(1)</a> and <a href="gitmodules.html">gitmodules(5)</a>).
Junio C Hamanoe6116832011-02-08 00:49:45843 That might be necessary to get the data needed for merging submodule
Junio C Hamano076ffcc2013-02-06 05:13:21844 commits, a feature Git learned in 1.7.3. Notice that the result of a
Junio C Hamanoe6116832011-02-08 00:49:45845 merge will not be checked out in the submodule, "git submodule update"
846 has to be called afterwards to bring the work tree up to date with the
847 merge result.
848</p>
849</dd>
Junio C Hamanoea90ab32010-03-15 20:32:55850</dl></div>
Junio C Hamano9d971152012-12-19 00:43:11851<div class="sect2">
852<h3 id="_options_related_to_merging">Options related to merging</h3>
Junio C Hamano68cf15a2010-11-06 01:01:59853<div class="dlist"><dl>
854<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55855--commit
856</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59857<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55858--no-commit
859</dt>
860<dd>
861<p>
862 Perform the merge and commit the result. This option can
863 be used to override --no-commit.
864</p>
Junio C Hamano68cf15a2010-11-06 01:01:59865<div class="paragraph"><p>With --no-commit perform the merge but pretend the merge
Junio C Hamanoc21ab052009-10-31 04:03:55866failed and do not autocommit, to give the user a chance to
867inspect and further tweak the merge result before committing.</p></div>
868</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59869<dt class="hdlist1">
Junio C Hamano11821ed2011-10-19 18:42:09870--edit
871</dt>
872<dt class="hdlist1">
Junio C Hamano7e590a12013-06-02 23:46:52873-e
874</dt>
875<dt class="hdlist1">
Junio C Hamano795a5a32012-02-02 01:36:37876--no-edit
Junio C Hamano11821ed2011-10-19 18:42:09877</dt>
878<dd>
Junio C Hamano92887a32011-12-07 00:26:29879<p>
Junio C Hamano795a5a32012-02-02 01:36:37880 Invoke an editor before committing successful mechanical merge to
881 further edit the auto-generated merge message, so that the user
Junio C Hamanoc14e6ad2014-10-31 20:25:53882 can explain and justify the merge. The <code>--no-edit</code> option can be
Junio C Hamano795a5a32012-02-02 01:36:37883 used to accept the auto-generated message (this is generally
Junio C Hamanoc5bd79e2014-01-27 21:31:26884 discouraged).
Junio C Hamano92887a32011-12-07 00:26:29885</p>
Junio C Hamano795a5a32012-02-02 01:36:37886<div class="paragraph"><p>Older scripts may depend on the historical behaviour of not allowing the
887user to edit the merge log message. They will see an editor opened when
Junio C Hamanoc14e6ad2014-10-31 20:25:53888they run <code>git merge</code>. To make it easier to adjust such scripts to the
889updated behaviour, the environment variable <code>GIT_MERGE_AUTOEDIT</code> can be
890set to <code>no</code> at the beginning of them.</p></div>
Junio C Hamano11821ed2011-10-19 18:42:09891</dd>
892<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55893--ff
894</dt>
Junio C Hamanof54f08e2012-02-27 07:49:19895<dd>
896<p>
897 When the merge resolves as a fast-forward, only update the branch
898 pointer, without creating a merge commit. This is the default
899 behavior.
900</p>
901</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59902<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55903--no-ff
904</dt>
905<dd>
906<p>
Junio C Hamanof54f08e2012-02-27 07:49:19907 Create a merge commit even when the merge resolves as a
Junio C Hamano778a3412013-03-28 23:24:30908 fast-forward. This is the default behaviour when merging an
909 annotated (and possibly signed) tag.
Junio C Hamanoc21ab052009-10-31 04:03:55910</p>
Junio C Hamanof54f08e2012-02-27 07:49:19911</dd>
912<dt class="hdlist1">
913--ff-only
914</dt>
915<dd>
916<p>
917 Refuse to merge and exit with a non-zero status unless the
Junio C Hamanoc14e6ad2014-10-31 20:25:53918 current <code>HEAD</code> is already up-to-date or the merge can be
Junio C Hamanof54f08e2012-02-27 07:49:19919 resolved as a fast-forward.
920</p>
Junio C Hamanoc21ab052009-10-31 04:03:55921</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59922<dt class="hdlist1">
Junio C Hamano3b4609d2010-09-30 00:04:34923--log[=&lt;n&gt;]
Junio C Hamanoc21ab052009-10-31 04:03:55924</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59925<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55926--no-log
927</dt>
928<dd>
929<p>
930 In addition to branch names, populate the log message with
Junio C Hamano3b4609d2010-09-30 00:04:34931 one-line descriptions from at most &lt;n&gt; actual commits that are being
Junio C Hamanoa28a9202012-06-21 07:08:23932 merged. See also <a href="git-fmt-merge-msg.html">git-fmt-merge-msg(1)</a>.
Junio C Hamanoc21ab052009-10-31 04:03:55933</p>
Junio C Hamano68cf15a2010-11-06 01:01:59934<div class="paragraph"><p>With --no-log do not list one-line descriptions from the
Junio C Hamanoc21ab052009-10-31 04:03:55935actual commits being merged.</p></div>
936</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59937<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55938--stat
939</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59940<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55941-n
942</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59943<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55944--no-stat
945</dt>
946<dd>
947<p>
948 Show a diffstat at the end of the merge. The diffstat is also
949 controlled by the configuration option merge.stat.
950</p>
Junio C Hamano68cf15a2010-11-06 01:01:59951<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:55952merge.</p></div>
953</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59954<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55955--squash
956</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59957<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55958--no-squash
959</dt>
960<dd>
961<p>
Junio C Hamanod75148a2014-04-08 19:48:38962 Produce the working tree and index state as if a real merge
963 happened (except for the merge information), but do not actually
Junio C Hamanoc14e6ad2014-10-31 20:25:53964 make a commit, move the <code>HEAD</code>, or record <code>$GIT_DIR/MERGE_HEAD</code>
965 (to cause the next <code>git commit</code> command to create a merge
Junio C Hamanod75148a2014-04-08 19:48:38966 commit). This allows you to create a single commit on top of
967 the current branch whose effect is the same as merging another
968 branch (or more in case of an octopus).
Junio C Hamanoc21ab052009-10-31 04:03:55969</p>
Junio C Hamano68cf15a2010-11-06 01:01:59970<div class="paragraph"><p>With --no-squash perform the merge and commit the result. This
Junio C Hamanoc21ab052009-10-31 04:03:55971option can be used to override --squash.</p></div>
972</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59973<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55974-s &lt;strategy&gt;
975</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59976<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:55977--strategy=&lt;strategy&gt;
978</dt>
979<dd>
980<p>
981 Use the given merge strategy; can be supplied more than
982 once to specify them in the order they should be tried.
Junio C Hamanoc14e6ad2014-10-31 20:25:53983 If there is no <code>-s</code> option, a built-in list of strategies
Junio C Hamano1aa40d22010-01-21 17:46:43984 is used instead (<em>git merge-recursive</em> when merging a single
985 head, <em>git merge-octopus</em> otherwise).
Junio C Hamanoc21ab052009-10-31 04:03:55986</p>
987</dd>
Junio C Hamano68cf15a2010-11-06 01:01:59988<dt class="hdlist1">
Junio C Hamanob04bb3f2010-04-14 14:07:36989-X &lt;option&gt;
990</dt>
Junio C Hamano68cf15a2010-11-06 01:01:59991<dt class="hdlist1">
Junio C Hamanob04bb3f2010-04-14 14:07:36992--strategy-option=&lt;option&gt;
993</dt>
994<dd>
995<p>
996 Pass merge strategy specific option through to the merge
997 strategy.
998</p>
999</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591000<dt class="hdlist1">
Junio C Hamanoedf80bd2013-04-05 22:14:361001--verify-signatures
1002</dt>
1003<dt class="hdlist1">
1004--no-verify-signatures
1005</dt>
1006<dd>
1007<p>
1008 Verify that the commits being merged have good and trusted GPG signatures
1009 and abort the merge in case they do not.
1010</p>
1011</dd>
1012<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:551013--summary
1014</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591015<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:551016--no-summary
1017</dt>
1018<dd>
1019<p>
1020 Synonyms to --stat and --no-stat; these are deprecated and will be
1021 removed in the future.
1022</p>
1023</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591024<dt class="hdlist1">
Junio C Hamanod0316112012-08-22 19:55:291025-r
1026</dt>
1027<dt class="hdlist1">
Junio C Hamano289d7e82016-01-27 00:20:381028--rebase[=false|true|preserve|interactive]
Junio C Hamano6d559fc2008-02-20 10:44:261029</dt>
1030<dd>
1031<p>
Junio C Hamanocf4a1742013-09-11 22:57:501032 When true, rebase the current branch on top of the upstream
1033 branch after fetching. If there is a remote-tracking branch
1034 corresponding to the upstream branch and the upstream branch
1035 was rebased since last fetched, the rebase uses that information
1036 to avoid rebasing non-local changes.
Junio C Hamano6d559fc2008-02-20 10:44:261037</p>
Junio C Hamanoba423bd2015-03-28 18:18:171038<div class="paragraph"><p>When set to preserve, rebase with the <code>--preserve-merges</code> option passed
1039to <code>git rebase</code> so that locally created merge commits will not be flattened.</p></div>
Junio C Hamanocf4a1742013-09-11 22:57:501040<div class="paragraph"><p>When false, merge the current branch into the upstream branch.</p></div>
Junio C Hamano289d7e82016-01-27 00:20:381041<div class="paragraph"><p>When <code>interactive</code>, enable the interactive mode of rebase.</p></div>
Junio C Hamano322c6242015-03-23 21:32:461042<div class="paragraph"><p>See <code>pull.rebase</code>, <code>branch.&lt;name&gt;.rebase</code> and <code>branch.autoSetupRebase</code> in
Junio C Hamanoc14e6ad2014-10-31 20:25:531043<a href="git-config.html">git-config(1)</a> if you want to make <code>git pull</code> always use
1044<code>--rebase</code> instead of merging.</p></div>
Junio C Hamano6fb124c2008-06-13 10:04:011045<div class="admonitionblock">
1046<table><tr>
1047<td class="icon">
1048<div class="title">Note</div>
1049</td>
Junio C Hamano68cf15a2010-11-06 01:01:591050<td class="content">This is a potentially <em>dangerous</em> mode of operation.
Junio C Hamano6d559fc2008-02-20 10:44:261051It rewrites history, which does not bode well when you
1052published that history already. Do <strong>not</strong> use this option
Junio C Hamanoa28a9202012-06-21 07:08:231053unless you have read <a href="git-rebase.html">git-rebase(1)</a> carefully.</td>
Junio C Hamano6fb124c2008-06-13 10:04:011054</tr></table>
1055</div>
Junio C Hamano6d559fc2008-02-20 10:44:261056</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591057<dt class="hdlist1">
Junio C Hamano6d559fc2008-02-20 10:44:261058--no-rebase
1059</dt>
1060<dd>
1061<p>
1062 Override earlier --rebase.
1063</p>
1064</dd>
Junio C Hamanoc21ab052009-10-31 04:03:551065</dl></div>
Junio C Hamano9d971152012-12-19 00:43:111066</div>
1067<div class="sect2">
1068<h3 id="_options_related_to_fetching">Options related to fetching</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591069<div class="dlist"><dl>
1070<dt class="hdlist1">
Junio C Hamano9df0c662009-11-23 11:09:271071--all
1072</dt>
1073<dd>
1074<p>
1075 Fetch all remotes.
1076</p>
1077</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591078<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471079-a
1080</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591081<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471082--append
Junio C Hamano1a4e8412005-12-27 08:17:231083</dt>
1084<dd>
1085<p>
1086 Append ref names and object names of fetched refs to the
Junio C Hamanoc14e6ad2014-10-31 20:25:531087 existing contents of <code>.git/FETCH_HEAD</code>. Without this
1088 option old data in <code>.git/FETCH_HEAD</code> will be overwritten.
Junio C Hamano1a4e8412005-12-27 08:17:231089</p>
1090</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591091<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:551092--depth=&lt;depth&gt;
Junio C Hamanoe663a7a2006-01-25 12:37:281093</dt>
Junio C Hamanoe663a7a2006-01-25 12:37:281094<dd>
1095<p>
Junio C Hamano4e6ba272016-01-20 23:23:191096 Limit fetching to the specified number of commits from the tip of
1097 each remote branch history. If fetching to a <em>shallow</em> repository
1098 created by <code>git clone</code> with <code>--depth=&lt;depth&gt;</code> option (see
1099 <a href="git-clone.html">git-clone(1)</a>), deepen or shorten the history to the specified
1100 number of commits. Tags for the deepened commits are not fetched.
Junio C Hamanoe663a7a2006-01-25 12:37:281101</p>
1102</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591103<dt class="hdlist1">
Junio C Hamano0d1122e2013-02-01 21:37:021104--unshallow
1105</dt>
1106<dd>
1107<p>
Junio C Hamano61525f92014-01-17 22:46:491108 If the source repository is complete, convert a shallow
1109 repository to a complete one, removing all the limitations
1110 imposed by shallow repositories.
1111</p>
1112<div class="paragraph"><p>If the source repository is shallow, fetch as much as possible so that
1113the current repository has the same history as the source repository.</p></div>
1114</dd>
1115<dt class="hdlist1">
1116--update-shallow
1117</dt>
1118<dd>
1119<p>
1120 By default when fetching from a shallow repository,
Junio C Hamanoc14e6ad2014-10-31 20:25:531121 <code>git fetch</code> refuses refs that require updating
Junio C Hamano61525f92014-01-17 22:46:491122 .git/shallow. This option updates .git/shallow and accept such
1123 refs.
Junio C Hamano0d1122e2013-02-01 21:37:021124</p>
1125</dd>
1126<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471127-f
1128</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591129<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471130--force
Junio C Hamano1a4e8412005-12-27 08:17:231131</dt>
1132<dd>
1133<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531134 When <em>git fetch</em> is used with <code>&lt;rbranch&gt;:&lt;lbranch&gt;</code>
Junio C Hamano1a4e8412005-12-27 08:17:231135 refspec, it refuses to update the local branch
Junio C Hamanoc14e6ad2014-10-31 20:25:531136 <code>&lt;lbranch&gt;</code> unless the remote branch <code>&lt;rbranch&gt;</code> it
1137 fetches is a descendant of <code>&lt;lbranch&gt;</code>. This option
Junio C Hamano1a4e8412005-12-27 08:17:231138 overrides that check.
1139</p>
1140</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591141<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:551142-k
1143</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591144<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:551145--keep
1146</dt>
1147<dd>
1148<p>
1149 Keep downloaded pack.
1150</p>
1151</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591152<dt class="hdlist1">
Junio C Hamanof7bb6692008-01-27 08:23:461153--no-tags
Junio C Hamano4d04a402006-01-09 00:53:281154</dt>
1155<dd>
1156<p>
Junio C Hamanof7bb6692008-01-27 08:23:461157 By default, tags that point at objects that are downloaded
1158 from the remote repository are fetched and stored locally.
Junio C Hamano075ae872010-09-01 18:43:071159 This option disables this automatic tag following. The default
Junio C Hamano322c6242015-03-23 21:32:461160 behavior for a remote may be specified with the remote.&lt;name&gt;.tagOpt
Junio C Hamanoa28a9202012-06-21 07:08:231161 setting. See <a href="git-config.html">git-config(1)</a>.
Junio C Hamano4d04a402006-01-09 00:53:281162</p>
1163</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591164<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471165-u
1166</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591167<dt class="hdlist1">
Junio C Hamanoeb415992008-06-08 22:49:471168--update-head-ok
Junio C Hamano1a4e8412005-12-27 08:17:231169</dt>
1170<dd>
1171<p>
Junio C Hamano1aa40d22010-01-21 17:46:431172 By default <em>git fetch</em> refuses to update the head which
Junio C Hamano1a4e8412005-12-27 08:17:231173 corresponds to the current branch. This flag disables the
Junio C Hamano1aa40d22010-01-21 17:46:431174 check. This is purely for the internal use for <em>git pull</em>
1175 to communicate with <em>git fetch</em>, and unless you are
Junio C Hamanob288d9e2007-01-02 00:04:151176 implementing your own Porcelain you are not supposed to
1177 use it.
1178</p>
1179</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591180<dt class="hdlist1">
Junio C Hamanoc21ab052009-10-31 04:03:551181--upload-pack &lt;upload-pack&gt;
Junio C Hamanob288d9e2007-01-02 00:04:151182</dt>
1183<dd>
1184<p>
Junio C Hamanoc21ab052009-10-31 04:03:551185 When given, and the repository to fetch from is handled
Junio C Hamano1aa40d22010-01-21 17:46:431186 by <em>git fetch-pack</em>, <em>--exec=&lt;upload-pack&gt;</em> is passed to
Junio C Hamanoc21ab052009-10-31 04:03:551187 the command to specify non-default path for the command
1188 run on the other end.
Junio C Hamano1a4e8412005-12-27 08:17:231189</p>
1190</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591191<dt class="hdlist1">
Junio C Hamanoea90ab32010-03-15 20:32:551192--progress
1193</dt>
1194<dd>
1195<p>
1196 Progress status is reported on the standard error stream
1197 by default when it is attached to a terminal, unless -q
1198 is specified. This flag forces progress status even if the
1199 standard error stream is not directed to a terminal.
1200</p>
1201</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591202<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231203&lt;repository&gt;
1204</dt>
1205<dd>
1206<p>
1207 The "remote" repository that is the source of a fetch
Junio C Hamano054ea082008-06-01 08:26:341208 or pull operation. This parameter can be either a URL
1209 (see the section <a href="#URLS">GIT URLS</a> below) or the name
1210 of a remote (see the section <a href="#REMOTES">REMOTES</a> below).
Junio C Hamano1a4e8412005-12-27 08:17:231211</p>
Junio C Hamano40f2f8d2006-02-07 08:04:391212</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591213<dt class="hdlist1">
Junio C Hamano40f2f8d2006-02-07 08:04:391214&lt;refspec&gt;
1215</dt>
1216<dd>
1217<p>
Junio C Hamano45f804f2014-06-20 22:24:491218 Specifies which refs to fetch and which local refs to update.
1219 When no &lt;refspec&gt;s appear on the command line, the refs to fetch
Junio C Hamanoc14e6ad2014-10-31 20:25:531220 are read from <code>remote.&lt;repository&gt;.fetch</code> variables instead
Junio C Hamano45f804f2014-06-20 22:24:491221 (see <a href="git-fetch.html">git-fetch(1)</a>).
Junio C Hamano40f2f8d2006-02-07 08:04:391222</p>
Junio C Hamano45f804f2014-06-20 22:24:491223<div class="paragraph"><p>The format of a &lt;refspec&gt; parameter is an optional plus
Junio C Hamanoc14e6ad2014-10-31 20:25:531224<code>+</code>, followed by the source ref &lt;src&gt;, followed
1225by a colon <code>:</code>, followed by the destination ref &lt;dst&gt;.
Junio C Hamano45f804f2014-06-20 22:24:491226The colon can be omitted when &lt;dst&gt; is empty.</p></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531227<div class="paragraph"><p><code>tag &lt;tag&gt;</code> means the same as <code>refs/tags/&lt;tag&gt;:refs/tags/&lt;tag&gt;</code>;
Junio C Hamano45f804f2014-06-20 22:24:491228it requests fetching everything up to the given tag.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591229<div class="paragraph"><p>The remote ref that matches &lt;src&gt;
Junio C Hamano40f2f8d2006-02-07 08:04:391230is fetched, and if &lt;dst&gt; is not empty string, the local
Junio C Hamano3f680f32009-11-16 02:10:541231ref that matches it is fast-forwarded using &lt;src&gt;.
Junio C Hamanoc14e6ad2014-10-31 20:25:531232If the optional plus <code>+</code> is used, the local ref
Junio C Hamano3f680f32009-11-16 02:10:541233is updated even if it does not result in a fast-forward
Junio C Hamanoba4b9282008-07-06 05:20:311234update.</p></div>
Junio C Hamano40f2f8d2006-02-07 08:04:391235<div class="admonitionblock">
1236<table><tr>
1237<td class="icon">
1238<div class="title">Note</div>
1239</td>
Junio C Hamano45f804f2014-06-20 22:24:491240<td class="content">When the remote branch you want to fetch is known to
1241be rewound and rebased regularly, it is expected that
1242its new tip will not be descendant of its previous tip
1243(as stored in your remote-tracking branch the last time
1244you fetched). You would want
Junio C Hamanoc14e6ad2014-10-31 20:25:531245to use the <code>+</code> sign to indicate non-fast-forward updates
Junio C Hamano45f804f2014-06-20 22:24:491246will be needed for such branches. There is no way to
1247determine or declare that a branch will be made available
1248in a repository with this behavior; the pulling user simply
Junio C Hamano40f2f8d2006-02-07 08:04:391249must know this is the expected usage pattern for a branch.</td>
1250</tr></table>
1251</div>
1252<div class="admonitionblock">
1253<table><tr>
1254<td class="icon">
1255<div class="title">Note</div>
1256</td>
Junio C Hamano40f2f8d2006-02-07 08:04:391257<td class="content">There is a difference between listing multiple &lt;refspec&gt;
Junio C Hamano1aa40d22010-01-21 17:46:431258directly on <em>git pull</em> command line and having multiple
Junio C Hamanoc14e6ad2014-10-31 20:25:531259<code>remote.&lt;repository&gt;.fetch</code> entries in your configuration
Junio C Hamano45f804f2014-06-20 22:24:491260for a &lt;repository&gt; and running a
Junio C Hamano1aa40d22010-01-21 17:46:431261<em>git pull</em> command without any explicit &lt;refspec&gt; parameters.
Junio C Hamano45f804f2014-06-20 22:24:491262&lt;refspec&gt;s listed explicitly on the command line are always
Junio C Hamano40f2f8d2006-02-07 08:04:391263merged into the current branch after fetching. In other words,
Junio C Hamano45f804f2014-06-20 22:24:491264if you list more than one remote ref, <em>git pull</em> will create
1265an Octopus merge. On the other hand, if you do not list any
1266explicit &lt;refspec&gt; parameter on the command line, <em>git pull</em>
1267will fetch all the &lt;refspec&gt;s it finds in the
Junio C Hamanoc14e6ad2014-10-31 20:25:531268<code>remote.&lt;repository&gt;.fetch</code> configuration and merge
Junio C Hamano45f804f2014-06-20 22:24:491269only the first &lt;refspec&gt; found into the current branch.
1270This is because making an
Junio C Hamano40f2f8d2006-02-07 08:04:391271Octopus from remote refs is rarely done, while keeping track
1272of multiple remote heads in one-go by fetching more than one
1273is often useful.</td>
1274</tr></table>
1275</div>
Junio C Hamano40f2f8d2006-02-07 08:04:391276</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311277</dl></div>
Junio C Hamano40f2f8d2006-02-07 08:04:391278</div>
Junio C Hamano9d971152012-12-19 00:43:111279</div>
1280</div>
1281<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311282<h2 id="_git_urls_a_id_urls_a">GIT URLS<a id="URLS"></a></h2>
Junio C Hamano40f2f8d2006-02-07 08:04:391283<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591284<div class="paragraph"><p>In general, URLs contain information about the transport protocol, the
Junio C Hamano0c053e82010-04-19 06:46:341285address of the remote server, and the path to the repository.
1286Depending on the transport protocol, some of this information may be
1287absent.</p></div>
Junio C Hamano6631a092012-10-10 22:50:571288<div class="paragraph"><p>Git supports ssh, git, http, and https protocols (in addition, ftp,
1289and ftps can be used for fetching and rsync can be used for fetching
1290and pushing, but these are inefficient and deprecated; do not use
1291them).</p></div>
Junio C Hamanoa1952302013-07-01 21:31:181292<div class="paragraph"><p>The native transport (i.e. git:// URL) does no authentication and
1293should be used with caution on unsecured networks.</p></div>
Junio C Hamano6631a092012-10-10 22:50:571294<div class="paragraph"><p>The following syntaxes may be used with them:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591295<div class="ulist"><ul>
Junio C Hamano1a4e8412005-12-27 08:17:231296<li>
1297<p>
Junio C Hamano0c053e82010-04-19 06:46:341298ssh://&#91;user@&#93;host.xz&#91;:port&#93;/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:231299</p>
1300</li>
1301<li>
1302<p>
Junio C Hamanoa3bb6eb2009-02-05 01:26:331303git://host.xz&#91;:port&#93;/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:231304</p>
1305</li>
1306<li>
1307<p>
Junio C Hamano0c053e82010-04-19 06:46:341308http&#91;s&#93;://host.xz&#91;:port&#93;/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:231309</p>
1310</li>
1311<li>
1312<p>
Junio C Hamano0c053e82010-04-19 06:46:341313ftp&#91;s&#93;://host.xz&#91;:port&#93;/path/to/repo.git/
Junio C Hamanodbb64592007-09-01 11:17:391314</p>
1315</li>
1316<li>
1317<p>
Junio C Hamano0c053e82010-04-19 06:46:341318rsync://host.xz/path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:231319</p>
1320</li>
Junio C Hamanoba4b9282008-07-06 05:20:311321</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591322<div class="paragraph"><p>An alternative scp-like syntax may also be used with the ssh protocol:</p></div>
1323<div class="ulist"><ul>
Junio C Hamano1a4e8412005-12-27 08:17:231324<li>
1325<p>
Junio C Hamano0c053e82010-04-19 06:46:341326&#91;user@&#93;host.xz:path/to/repo.git/
Junio C Hamano1a4e8412005-12-27 08:17:231327</p>
1328</li>
Junio C Hamanoba4b9282008-07-06 05:20:311329</ul></div>
Junio C Hamano7e590a12013-06-02 23:46:521330<div class="paragraph"><p>This syntax is only recognized if there are no slashes before the
1331first colon. This helps differentiate a local path that contains a
Junio C Hamanoc14e6ad2014-10-31 20:25:531332colon. For example the local path <code>foo:bar</code> could be specified as an
1333absolute path or <code>./foo:bar</code> to avoid being misinterpreted as an ssh
Junio C Hamano7e590a12013-06-02 23:46:521334url.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591335<div class="paragraph"><p>The ssh and git protocols additionally support ~username expansion:</p></div>
1336<div class="ulist"><ul>
Junio C Hamano0c053e82010-04-19 06:46:341337<li>
1338<p>
1339ssh://&#91;user@&#93;host.xz&#91;:port&#93;/~&#91;user&#93;/path/to/repo.git/
1340</p>
1341</li>
1342<li>
1343<p>
1344git://host.xz&#91;:port&#93;/~&#91;user&#93;/path/to/repo.git/
1345</p>
1346</li>
1347<li>
1348<p>
1349&#91;user@&#93;host.xz:/~&#91;user&#93;/path/to/repo.git/
1350</p>
1351</li>
1352</ul></div>
Junio C Hamano076ffcc2013-02-06 05:13:211353<div class="paragraph"><p>For local repositories, also supported by Git natively, the following
Junio C Hamano0c053e82010-04-19 06:46:341354syntaxes may be used:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591355<div class="ulist"><ul>
Junio C Hamano1a4e8412005-12-27 08:17:231356<li>
1357<p>
1358/path/to/repo.git/
1359</p>
1360</li>
Junio C Hamanob1d6e882007-08-11 08:30:161361<li>
1362<p>
Junio C Hamanodc8f8de2013-06-05 22:58:071363file:///path/to/repo.git/
Junio C Hamanob1d6e882007-08-11 08:30:161364</p>
1365</li>
Junio C Hamanoba4b9282008-07-06 05:20:311366</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591367<div class="paragraph"><p>These two syntaxes are mostly equivalent, except when cloning, when
Junio C Hamanoa28a9202012-06-21 07:08:231368the former implies --local option. See <a href="git-clone.html">git-clone(1)</a> for
Junio C Hamano0c053e82010-04-19 06:46:341369details.</p></div>
Junio C Hamano076ffcc2013-02-06 05:13:211370<div class="paragraph"><p>When Git doesn&#8217;t know how to handle a certain transport protocol, it
Junio C Hamano0c053e82010-04-19 06:46:341371attempts to use the <em>remote-&lt;transport&gt;</em> remote helper, if one
1372exists. To explicitly request a remote helper, the following syntax
1373may be used:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591374<div class="ulist"><ul>
Junio C Hamano0c053e82010-04-19 06:46:341375<li>
1376<p>
1377&lt;transport&gt;::&lt;address&gt;
1378</p>
1379</li>
1380</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591381<div class="paragraph"><p>where &lt;address&gt; may be a path, a server and path, or an arbitrary
Junio C Hamano0c053e82010-04-19 06:46:341382URL-like string recognized by the specific remote helper being
Junio C Hamanob5e079f2013-02-08 00:02:521383invoked. See <a href="gitremote-helpers.html">gitremote-helpers(1)</a> for details.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591384<div class="paragraph"><p>If there are a large number of similarly-named remote repositories and
Junio C Hamano24bc09a2008-02-28 00:27:441385you want to use a different format for them (such that the URLs you
1386use will be rewritten into URLs that work), you can create a
Junio C Hamanoba4b9282008-07-06 05:20:311387configuration section of the form:</p></div>
Junio C Hamano24bc09a2008-02-28 00:27:441388<div class="listingblock">
1389<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531390<pre><code> [url "&lt;actual url base&gt;"]
1391 insteadOf = &lt;other url base&gt;</code></pre>
Junio C Hamano24bc09a2008-02-28 00:27:441392</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591393<div class="paragraph"><p>For example, with this:</p></div>
Junio C Hamano24bc09a2008-02-28 00:27:441394<div class="listingblock">
1395<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531396<pre><code> [url "git://git.host.xz/"]
Junio C Hamano24bc09a2008-02-28 00:27:441397 insteadOf = host.xz:/path/to/
Junio C Hamanoc14e6ad2014-10-31 20:25:531398 insteadOf = work:</code></pre>
Junio C Hamano24bc09a2008-02-28 00:27:441399</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591400<div class="paragraph"><p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
Junio C Hamanoba4b9282008-07-06 05:20:311401rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591402<div class="paragraph"><p>If you want to rewrite URLs for push only, you can create a
Junio C Hamano7df6dcf2009-09-13 09:51:171403configuration section of the form:</p></div>
1404<div class="listingblock">
1405<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531406<pre><code> [url "&lt;actual url base&gt;"]
1407 pushInsteadOf = &lt;other url base&gt;</code></pre>
Junio C Hamano7df6dcf2009-09-13 09:51:171408</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591409<div class="paragraph"><p>For example, with this:</p></div>
Junio C Hamano7df6dcf2009-09-13 09:51:171410<div class="listingblock">
1411<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531412<pre><code> [url "ssh://example.org/"]
1413 pushInsteadOf = git://example.org/</code></pre>
Junio C Hamano7df6dcf2009-09-13 09:51:171414</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591415<div class="paragraph"><p>a URL like "git://example.org/path/to/repo.git" will be rewritten to
Junio C Hamano7df6dcf2009-09-13 09:51:171416"ssh://example.org/path/to/repo.git" for pushes, but pulls will still
1417use the original URL.</p></div>
Junio C Hamano40f2f8d2006-02-07 08:04:391418</div>
Junio C Hamano9d971152012-12-19 00:43:111419</div>
1420<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311421<h2 id="_remotes_a_id_remotes_a">REMOTES<a id="REMOTES"></a></h2>
Junio C Hamano40f2f8d2006-02-07 08:04:391422<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591423<div class="paragraph"><p>The name of one of the following can be used instead
Junio C Hamanoc14e6ad2014-10-31 20:25:531424of a URL as <code>&lt;repository&gt;</code> argument:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591425<div class="ulist"><ul>
Junio C Hamano054ea082008-06-01 08:26:341426<li>
1427<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531428a remote in the Git configuration file: <code>$GIT_DIR/config</code>,
Junio C Hamano054ea082008-06-01 08:26:341429</p>
1430</li>
1431<li>
1432<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531433a file in the <code>$GIT_DIR/remotes</code> directory, or
Junio C Hamano054ea082008-06-01 08:26:341434</p>
1435</li>
1436<li>
1437<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531438a file in the <code>$GIT_DIR/branches</code> directory.
Junio C Hamano054ea082008-06-01 08:26:341439</p>
1440</li>
Junio C Hamanoba4b9282008-07-06 05:20:311441</ul></div>
Junio C Hamano68cf15a2010-11-06 01:01:591442<div class="paragraph"><p>All of these also allow you to omit the refspec from the command line
Junio C Hamanoba4b9282008-07-06 05:20:311443because they each contain a refspec which git will use by default.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111444<div class="sect2">
1445<h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3>
Junio C Hamano68cf15a2010-11-06 01:01:591446<div class="paragraph"><p>You can choose to provide the name of a remote which you had previously
Junio C Hamanoa28a9202012-06-21 07:08:231447configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a>
Junio C Hamanoc14e6ad2014-10-31 20:25:531448or even by a manual edit to the <code>$GIT_DIR/config</code> file. The URL of
Junio C Hamano054ea082008-06-01 08:26:341449this remote will be used to access the repository. The refspec
1450of this remote will be used by default when you do
1451not provide a refspec on the command line. The entry in the
Junio C Hamanoba4b9282008-07-06 05:20:311452config file would appear like this:</p></div>
Junio C Hamano054ea082008-06-01 08:26:341453<div class="listingblock">
1454<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531455<pre><code> [remote "&lt;name&gt;"]
Junio C Hamano054ea082008-06-01 08:26:341456 url = &lt;url&gt;
Junio C Hamano0e88f3e2009-06-21 08:03:251457 pushurl = &lt;pushurl&gt;
Junio C Hamano054ea082008-06-01 08:26:341458 push = &lt;refspec&gt;
Junio C Hamanoc14e6ad2014-10-31 20:25:531459 fetch = &lt;refspec&gt;</code></pre>
Junio C Hamano054ea082008-06-01 08:26:341460</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531461<div class="paragraph"><p>The <code>&lt;pushurl&gt;</code> is used for pushes only. It is optional and defaults
1462to <code>&lt;url&gt;</code>.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111463</div>
1464<div class="sect2">
Junio C Hamanoc14e6ad2014-10-31 20:25:531465<h3 id="_named_file_in_code_git_dir_remotes_code">Named file in <code>$GIT_DIR/remotes</code></h3>
Junio C Hamano68cf15a2010-11-06 01:01:591466<div class="paragraph"><p>You can choose to provide the name of a
Junio C Hamanoc14e6ad2014-10-31 20:25:531467file in <code>$GIT_DIR/remotes</code>. The URL
Junio C Hamano054ea082008-06-01 08:26:341468in this file will be used to access the repository. The refspec
1469in this file will be used as default when you do not
1470provide a refspec on the command line. This file should have the
Junio C Hamanoba4b9282008-07-06 05:20:311471following format:</p></div>
Junio C Hamano1caaf472006-12-31 08:29:351472<div class="listingblock">
Junio C Hamano1a4e8412005-12-27 08:17:231473<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531474<pre><code> URL: one of the above URL format
Junio C Hamanod3361ad2007-01-01 03:20:241475 Push: &lt;refspec&gt;
Junio C Hamanoc14e6ad2014-10-31 20:25:531476 Pull: &lt;refspec&gt;</code></pre>
Junio C Hamano1a4e8412005-12-27 08:17:231477</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531478<div class="paragraph"><p><code>Push:</code> lines are used by <em>git push</em> and
1479<code>Pull:</code> lines are used by <em>git pull</em> and <em>git fetch</em>.
1480Multiple <code>Push:</code> and <code>Pull:</code> lines may
Junio C Hamanoba4b9282008-07-06 05:20:311481be specified for additional branch mappings.</p></div>
Junio C Hamano9d971152012-12-19 00:43:111482</div>
1483<div class="sect2">
Junio C Hamanoc14e6ad2014-10-31 20:25:531484<h3 id="_named_file_in_code_git_dir_branches_code">Named file in <code>$GIT_DIR/branches</code></h3>
Junio C Hamano68cf15a2010-11-06 01:01:591485<div class="paragraph"><p>You can choose to provide the name of a
Junio C Hamanoc14e6ad2014-10-31 20:25:531486file in <code>$GIT_DIR/branches</code>.
Junio C Hamano054ea082008-06-01 08:26:341487The URL in this file will be used to access the repository.
Junio C Hamanoba4b9282008-07-06 05:20:311488This file should have the following format:</p></div>
Junio C Hamano1caaf472006-12-31 08:29:351489<div class="listingblock">
Junio C Hamano249572f2006-10-24 05:44:081490<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531491<pre><code> &lt;url&gt;#&lt;head&gt;</code></pre>
Junio C Hamano249572f2006-10-24 05:44:081492</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531493<div class="paragraph"><p><code>&lt;url&gt;</code> is required; <code>#&lt;head&gt;</code> is optional.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591494<div class="paragraph"><p>Depending on the operation, git will use one of the following
1495refspecs, if you don&#8217;t provide one on the command line.
Junio C Hamanoc14e6ad2014-10-31 20:25:531496<code>&lt;branch&gt;</code> is the name of this file in <code>$GIT_DIR/branches</code> and
1497<code>&lt;head&gt;</code> defaults to <code>master</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591498<div class="paragraph"><p>git fetch uses:</p></div>
Junio C Hamano1caaf472006-12-31 08:29:351499<div class="listingblock">
Junio C Hamano1a4e8412005-12-27 08:17:231500<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531501<pre><code> refs/heads/&lt;head&gt;:refs/heads/&lt;branch&gt;</code></pre>
Junio C Hamano28363492008-11-14 08:26:311502</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591503<div class="paragraph"><p>git push uses:</p></div>
Junio C Hamano28363492008-11-14 08:26:311504<div class="listingblock">
1505<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531506<pre><code> HEAD:refs/heads/&lt;head&gt;</code></pre>
Junio C Hamano1a4e8412005-12-27 08:17:231507</div></div>
Junio C Hamano1a4e8412005-12-27 08:17:231508</div>
Junio C Hamano9d971152012-12-19 00:43:111509</div>
1510</div>
1511<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311512<h2 id="_merge_strategies">MERGE STRATEGIES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231513<div class="sectionbody">
Junio C Hamanoc14e6ad2014-10-31 20:25:531514<div class="paragraph"><p>The merge mechanism (<code>git merge</code> and <code>git pull</code> commands) allows the
1515backend <em>merge strategies</em> to be chosen with <code>-s</code> option. Some strategies
1516can also take their own options, which can be passed by giving <code>-X&lt;option&gt;</code>
1517arguments to <code>git merge</code> and/or <code>git pull</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591518<div class="dlist"><dl>
1519<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231520resolve
1521</dt>
1522<dd>
1523<p>
1524 This can only resolve two heads (i.e. the current branch
Junio C Hamano1de75722009-03-26 08:39:381525 and another branch you pulled from) using a 3-way merge
Junio C Hamano1a4e8412005-12-27 08:17:231526 algorithm. It tries to carefully detect criss-cross
1527 merge ambiguities and is considered generally safe and
1528 fast.
1529</p>
1530</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591531<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231532recursive
1533</dt>
1534<dd>
1535<p>
Junio C Hamano1de75722009-03-26 08:39:381536 This can only resolve two heads using a 3-way merge
1537 algorithm. When there is more than one common
1538 ancestor that can be used for 3-way merge, it creates a
Junio C Hamano1a4e8412005-12-27 08:17:231539 merged tree of the common ancestors and uses that as
1540 the reference tree for the 3-way merge. This has been
1541 reported to result in fewer merge conflicts without
Junio C Hamano5b3533d2014-02-27 23:07:151542 causing mismerges by tests done on actual merge commits
Junio C Hamano1a4e8412005-12-27 08:17:231543 taken from Linux 2.6 kernel development history.
1544 Additionally this can detect and handle merges involving
1545 renames. This is the default merge strategy when
1546 pulling or merging one branch.
1547</p>
Junio C Hamano68cf15a2010-11-06 01:01:591548<div class="paragraph"><p>The <em>recursive</em> strategy can take the following options:</p></div>
1549<div class="dlist"><dl>
1550<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431551ours
1552</dt>
1553<dd>
1554<p>
1555 This option forces conflicting hunks to be auto-resolved cleanly by
1556 favoring <em>our</em> version. Changes from the other tree that do not
1557 conflict with our side are reflected to the merge result.
Junio C Hamanoa3cfb762012-09-15 05:32:141558 For a binary file, the entire contents are taken from our side.
Junio C Hamano1aa40d22010-01-21 17:46:431559</p>
Junio C Hamano68cf15a2010-11-06 01:01:591560<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:431561even look at what the other tree contains at all. It discards everything
1562the other tree did, declaring <em>our</em> history contains all that happened in it.</p></div>
1563</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591564<dt class="hdlist1">
Junio C Hamano1aa40d22010-01-21 17:46:431565theirs
1566</dt>
1567<dd>
1568<p>
Junio C Hamanoa3cfb762012-09-15 05:32:141569 This is the opposite of <em>ours</em>.
Junio C Hamano1aa40d22010-01-21 17:46:431570</p>
1571</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591572<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541573patience
1574</dt>
1575<dd>
1576<p>
1577 With this option, <em>merge-recursive</em> spends a little extra time
1578 to avoid mismerges that sometimes occur due to unimportant
1579 matching lines (e.g., braces from distinct functions). Use
1580 this when the branches to be merged have diverged wildly.
Junio C Hamanoc14e6ad2014-10-31 20:25:531581 See also <a href="git-diff.html">git-diff(1)</a> <code>--patience</code>.
Junio C Hamano39c7a692010-10-27 06:08:541582</p>
1583</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591584<dt class="hdlist1">
Junio C Hamano1575c202013-04-15 20:25:591585diff-algorithm=[patience|minimal|histogram|myers]
1586</dt>
1587<dd>
1588<p>
1589 Tells <em>merge-recursive</em> to use a different diff algorithm, which
1590 can help avoid mismerges that occur due to unimportant matching
1591 lines (such as braces from distinct functions). See also
Junio C Hamanoc14e6ad2014-10-31 20:25:531592 <a href="git-diff.html">git-diff(1)</a> <code>--diff-algorithm</code>.
Junio C Hamano1575c202013-04-15 20:25:591593</p>
1594</dd>
1595<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541596ignore-space-change
1597</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591598<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541599ignore-all-space
1600</dt>
Junio C Hamano68cf15a2010-11-06 01:01:591601<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541602ignore-space-at-eol
1603</dt>
1604<dd>
1605<p>
1606 Treats lines with the indicated type of whitespace change as
1607 unchanged for the sake of a three-way merge. Whitespace
1608 changes mixed with other changes to a line are not ignored.
Junio C Hamanoc14e6ad2014-10-31 20:25:531609 See also <a href="git-diff.html">git-diff(1)</a> <code>-b</code>, <code>-w</code>, and
1610 <code>--ignore-space-at-eol</code>.
Junio C Hamano39c7a692010-10-27 06:08:541611</p>
Junio C Hamano68cf15a2010-11-06 01:01:591612<div class="ulist"><ul>
Junio C Hamano39c7a692010-10-27 06:08:541613<li>
1614<p>
1615If <em>their</em> version only introduces whitespace changes to a line,
1616 <em>our</em> version is used;
1617</p>
1618</li>
1619<li>
1620<p>
1621If <em>our</em> version introduces whitespace changes but <em>their</em>
1622 version includes a substantial change, <em>their</em> version is used;
1623</p>
1624</li>
1625<li>
1626<p>
1627Otherwise, the merge proceeds in the usual way.
1628</p>
1629</li>
1630</ul></div>
1631</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591632<dt class="hdlist1">
Junio C Hamano2db3e752010-09-03 21:33:061633renormalize
1634</dt>
1635<dd>
1636<p>
1637 This runs a virtual check-out and check-in of all three stages
1638 of a file when resolving a three-way merge. This option is
1639 meant to be used when merging branches with different clean
1640 filters or end-of-line normalization rules. See "Merging
1641 branches with differing checkin/checkout attributes" in
Junio C Hamanoa28a9202012-06-21 07:08:231642 <a href="gitattributes.html">gitattributes(5)</a> for details.
Junio C Hamano2db3e752010-09-03 21:33:061643</p>
1644</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591645<dt class="hdlist1">
Junio C Hamano2db3e752010-09-03 21:33:061646no-renormalize
1647</dt>
1648<dd>
1649<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531650 Disables the <code>renormalize</code> option. This overrides the
1651 <code>merge.renormalize</code> configuration variable.
Junio C Hamano2db3e752010-09-03 21:33:061652</p>
1653</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591654<dt class="hdlist1">
Junio C Hamano39c7a692010-10-27 06:08:541655rename-threshold=&lt;n&gt;
1656</dt>
1657<dd>
1658<p>
1659 Controls the similarity threshold used for rename detection.
Junio C Hamanoc14e6ad2014-10-31 20:25:531660 See also <a href="git-diff.html">git-diff(1)</a> <code>-M</code>.
Junio C Hamano39c7a692010-10-27 06:08:541661</p>
1662</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591663<dt class="hdlist1">
Junio C Hamanod2179ef2010-10-22 04:12:171664subtree[=&lt;path&gt;]
Junio C Hamano1aa40d22010-01-21 17:46:431665</dt>
1666<dd>
1667<p>
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>
Junio C Hamano1a4e8412005-12-27 08:17:231676</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591677<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231678octopus
1679</dt>
1680<dd>
1681<p>
Junio C Hamano1de75722009-03-26 08:39:381682 This resolves cases with more than two heads, but refuses to do
1683 a complex merge that needs manual resolution. It is
Junio C Hamano1a4e8412005-12-27 08:17:231684 primarily meant to be used for bundling topic branch
1685 heads together. This is the default merge strategy when
Junio C Hamano1de75722009-03-26 08:39:381686 pulling or merging more than one branch.
Junio C Hamano1a4e8412005-12-27 08:17:231687</p>
1688</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591689<dt class="hdlist1">
Junio C Hamano1a4e8412005-12-27 08:17:231690ours
1691</dt>
1692<dd>
1693<p>
Junio C Hamanobf984de2009-11-23 06:11:191694 This resolves any number of heads, but the resulting tree of the
1695 merge is always that of the current branch head, effectively
1696 ignoring all changes from all other branches. It is meant to
Junio C Hamano1a4e8412005-12-27 08:17:231697 be used to supersede old development history of side
Junio C Hamano1aa40d22010-01-21 17:46:431698 branches. Note that this is different from the -Xours option to
1699 the <em>recursive</em> merge strategy.
Junio C Hamano1a4e8412005-12-27 08:17:231700</p>
1701</dd>
Junio C Hamano68cf15a2010-11-06 01:01:591702<dt class="hdlist1">
Junio C Hamanoe6c92032008-03-19 09:24:341703subtree
1704</dt>
1705<dd>
1706<p>
1707 This is a modified recursive strategy. When merging trees A and
1708 B, if B corresponds to a subtree of A, B is first adjusted to
1709 match the tree structure of A, instead of reading the trees at
1710 the same level. This adjustment is also done to the common
1711 ancestor tree.
1712</p>
1713</dd>
Junio C Hamanoba4b9282008-07-06 05:20:311714</dl></div>
Junio C Hamanocf77b042013-12-17 23:54:211715<div class="paragraph"><p>With the strategies that use 3-way merge (including the default, <em>recursive</em>),
1716if a change is made on both branches, but later reverted on one of the
1717branches, that change will be present in the merged result; some people find
1718this behavior confusing. It occurs because only the heads and the merge base
1719are considered when performing a merge, not the individual commits. The merge
1720algorithm therefore considers the reverted change as no change at all, and
1721substitutes the changed version instead.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231722</div>
Junio C Hamano9d971152012-12-19 00:43:111723</div>
1724<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311725<h2 id="_default_behaviour">DEFAULT BEHAVIOUR</h2>
Junio C Hamanod3339982007-02-09 08:38:481726<div class="sectionbody">
Junio C Hamanoc14e6ad2014-10-31 20:25:531727<div class="paragraph"><p>Often people use <code>git pull</code> without giving any parameter.
1728Traditionally, this has been equivalent to saying <code>git pull
1729origin</code>. However, when configuration <code>branch.&lt;name&gt;.remote</code> is
1730present while on branch <code>&lt;name&gt;</code>, that value is used instead of
1731<code>origin</code>.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591732<div class="paragraph"><p>In order to determine what URL to use to fetch from, the value
Junio C Hamanoc14e6ad2014-10-31 20:25:531733of the configuration <code>remote.&lt;origin&gt;.url</code> is consulted
1734and if there is not any such variable, the value on <code>URL: ` line
1735in `$GIT_DIR/remotes/&lt;origin&gt;</code> file is used.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591736<div class="paragraph"><p>In order to determine what remote branches to fetch (and
Junio C Hamano97bcb482010-11-25 03:16:071737optionally store in the remote-tracking branches) when the command is
Junio C Hamanod3339982007-02-09 08:38:481738run without any refspec parameters on the command line, values
Junio C Hamanoc14e6ad2014-10-31 20:25:531739of the configuration variable <code>remote.&lt;origin&gt;.fetch</code> are
1740consulted, and if there aren&#8217;t any, <code>$GIT_DIR/remotes/&lt;origin&gt;</code>
Junio C Hamano68cf15a2010-11-06 01:01:591741file is consulted and its `Pull: ` lines are used.
Junio C Hamanod3339982007-02-09 08:38:481742In addition to the refspec formats described in the OPTIONS
Junio C Hamanoba4b9282008-07-06 05:20:311743section, you can have a globbing refspec that looks like this:</p></div>
Junio C Hamanod3339982007-02-09 08:38:481744<div class="listingblock">
1745<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531746<pre><code>refs/heads/*:refs/remotes/origin/*</code></pre>
Junio C Hamanod3339982007-02-09 08:38:481747</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591748<div class="paragraph"><p>A globbing refspec must have a non-empty RHS (i.e. must store
Junio C Hamano97bcb482010-11-25 03:16:071749what were fetched in remote-tracking branches), and its LHS and RHS
Junio C Hamanoc14e6ad2014-10-31 20:25:531750must end with <code>/*</code>. The above specifies that all remote
Junio C Hamano97bcb482010-11-25 03:16:071751branches are tracked using remote-tracking branches in
Junio C Hamanoc14e6ad2014-10-31 20:25:531752<code>refs/remotes/origin/</code> hierarchy under the same name.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591753<div class="paragraph"><p>The rule to determine which remote branch to merge after
Junio C Hamanod3339982007-02-09 08:38:481754fetching is a bit involved, in order not to break backward
Junio C Hamanoba4b9282008-07-06 05:20:311755compatibility.</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591756<div class="paragraph"><p>If explicit refspecs were given on the command
Junio C Hamanoc14e6ad2014-10-31 20:25:531757line of <code>git pull</code>, they are all merged.</p></div>
1758<div class="paragraph"><p>When no refspec was given on the command line, then <code>git pull</code>
Junio C Hamanod3339982007-02-09 08:38:481759uses the refspec from the configuration or
Junio C Hamanoc14e6ad2014-10-31 20:25:531760<code>$GIT_DIR/remotes/&lt;origin&gt;</code>. In such cases, the following
Junio C Hamanoba4b9282008-07-06 05:20:311761rules apply:</p></div>
Junio C Hamano68cf15a2010-11-06 01:01:591762<div class="olist arabic"><ol class="arabic">
Junio C Hamanod3339982007-02-09 08:38:481763<li>
1764<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531765If <code>branch.&lt;name&gt;.merge</code> configuration for the current
1766 branch <code>&lt;name&gt;</code> exists, that is the name of the branch at the
Junio C Hamanod3339982007-02-09 08:38:481767 remote site that is merged.
1768</p>
1769</li>
1770<li>
1771<p>
1772If the refspec is a globbing one, nothing is merged.
1773</p>
1774</li>
1775<li>
1776<p>
1777Otherwise the remote branch of the first refspec is merged.
1778</p>
1779</li>
Junio C Hamanoba4b9282008-07-06 05:20:311780</ol></div>
Junio C Hamanod3339982007-02-09 08:38:481781</div>
Junio C Hamano9d971152012-12-19 00:43:111782</div>
1783<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311784<h2 id="_examples">EXAMPLES</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231785<div class="sectionbody">
Junio C Hamano68cf15a2010-11-06 01:01:591786<div class="ulist"><ul>
Junio C Hamano6d76d612008-05-09 05:46:081787<li>
Junio C Hamano1a4e8412005-12-27 08:17:231788<p>
Junio C Hamano6d76d612008-05-09 05:46:081789Update the remote-tracking branches for the repository
1790 you cloned from, then merge one of them into your
1791 current branch:
Junio C Hamano1a4e8412005-12-27 08:17:231792</p>
Junio C Hamano6d76d612008-05-09 05:46:081793<div class="listingblock">
1794<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531795<pre><code>$ git pull, git pull origin</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:081796</div></div>
Junio C Hamano68cf15a2010-11-06 01:01:591797<div class="paragraph"><p>Normally the branch merged in is the HEAD of the remote repository,
Junio C Hamano6d76d612008-05-09 05:46:081798but the choice is determined by the branch.&lt;name&gt;.remote and
Junio C Hamanoa28a9202012-06-21 07:08:231799branch.&lt;name&gt;.merge options; see <a href="git-config.html">git-config(1)</a> for details.</p></div>
Junio C Hamano6d76d612008-05-09 05:46:081800</li>
1801<li>
Junio C Hamano1a4e8412005-12-27 08:17:231802<p>
Junio C Hamanoc14e6ad2014-10-31 20:25:531803Merge into the current branch the remote branch <code>next</code>:
Junio C Hamano1a4e8412005-12-27 08:17:231804</p>
Junio C Hamano6d76d612008-05-09 05:46:081805<div class="listingblock">
1806<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531807<pre><code>$ git pull origin next</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:081808</div></div>
Junio C Hamanoc14e6ad2014-10-31 20:25:531809<div class="paragraph"><p>This leaves a copy of <code>next</code> temporarily in FETCH_HEAD, but
Junio C Hamanoc21ab052009-10-31 04:03:551810does not update any remote-tracking branches. Using remote-tracking
1811branches, the same can be done by invoking fetch and merge:</p></div>
Junio C Hamano6d76d612008-05-09 05:46:081812<div class="listingblock">
1813<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531814<pre><code>$ git fetch origin
1815$ git merge origin/next</code></pre>
Junio C Hamano6d76d612008-05-09 05:46:081816</div></div>
Junio C Hamano6d76d612008-05-09 05:46:081817</li>
Junio C Hamanoba4b9282008-07-06 05:20:311818</ul></div>
Junio C Hamano09cfe6f2013-03-27 22:10:421819<div class="paragraph"><p>If you tried a pull which resulted in complex conflicts and
Junio C Hamano1aa40d22010-01-21 17:46:431820would want to start over, you can recover with <em>git reset</em>.</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231821</div>
Junio C Hamano9d971152012-12-19 00:43:111822</div>
1823<div class="sect1">
Junio C Hamano5cd15182011-04-05 00:21:101824<h2 id="_bugs">BUGS</h2>
1825<div class="sectionbody">
1826<div class="paragraph"><p>Using --recurse-submodules can only fetch new commits in already checked
1827out submodules right now. When e.g. upstream added a new submodule in the
1828just fetched commits of the superproject the submodule itself can not be
1829fetched, making it impossible to check out that submodule later without
Junio C Hamano076ffcc2013-02-06 05:13:211830having to do a fetch again. This is expected to be fixed in a future Git
Junio C Hamano5cd15182011-04-05 00:21:101831version.</p></div>
1832</div>
Junio C Hamano9d971152012-12-19 00:43:111833</div>
1834<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311835<h2 id="_see_also">SEE ALSO</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231836<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231837<div class="paragraph"><p><a href="git-fetch.html">git-fetch(1)</a>, <a href="git-merge.html">git-merge(1)</a>, <a href="git-config.html">git-config(1)</a></p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231838</div>
Junio C Hamano9d971152012-12-19 00:43:111839</div>
1840<div class="sect1">
Junio C Hamanoba4b9282008-07-06 05:20:311841<h2 id="_git">GIT</h2>
Junio C Hamano1a4e8412005-12-27 08:17:231842<div class="sectionbody">
Junio C Hamanoa28a9202012-06-21 07:08:231843<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
Junio C Hamano1a4e8412005-12-27 08:17:231844</div>
Junio C Hamano7bd050f2011-09-22 06:32:221845</div>
Junio C Hamano9d971152012-12-19 00:43:111846</div>
Junio C Hamano7bd050f2011-09-22 06:32:221847<div id="footnotes"><hr /></div>
Junio C Hamano1a4e8412005-12-27 08:17:231848<div id="footer">
1849<div id="footer-text">
Junio C Hamano289d7e82016-01-27 00:20:381850Last updated 2016-01-26 16:20:09 PST
Junio C Hamano1a4e8412005-12-27 08:17:231851</div>
1852</div>
1853</body>
1854</html>