Autogenerated HTML docs for v2.46.0-348-g6a09c36
[git-htmldocs.git] / git-fetch.html
blob1d2998c712f85df954bdc860513930a921f91378
1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3 <head>
4 <meta charset="UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
7 <meta name="generator" content="Asciidoctor 2.0.20"/>
8 <title>git-fetch(1)</title>
9 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"/>
10 <style>
11 /*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
12 /* Uncomment the following line when using as a custom stylesheet */
13 /* @import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
14 html{font-family:sans-serif;-webkit-text-size-adjust:100%}
15 a{background:none}
16 a:focus{outline:thin dotted}
17 a:active,a:hover{outline:0}
18 h1{font-size:2em;margin:.67em 0}
19 b,strong{font-weight:bold}
20 abbr{font-size:.9em}
21 abbr[title]{cursor:help;border-bottom:1px dotted #dddddf;text-decoration:none}
22 dfn{font-style:italic}
23 hr{height:0}
24 mark{background:#ff0;color:#000}
25 code,kbd,pre,samp{font-family:monospace;font-size:1em}
26 pre{white-space:pre-wrap}
27 q{quotes:"\201C" "\201D" "\2018" "\2019"}
28 small{font-size:80%}
29 sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
30 sup{top:-.5em}
31 sub{bottom:-.25em}
32 img{border:0}
33 svg:not(:root){overflow:hidden}
34 figure{margin:0}
35 audio,video{display:inline-block}
36 audio:not([controls]){display:none;height:0}
37 fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
38 legend{border:0;padding:0}
39 button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
40 button,input{line-height:normal}
41 button,select{text-transform:none}
42 button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43 button[disabled],html input[disabled]{cursor:default}
44 input[type=checkbox],input[type=radio]{padding:0}
45 button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
46 textarea{overflow:auto;vertical-align:top}
47 table{border-collapse:collapse;border-spacing:0}
48 *,::before,::after{box-sizing:border-box}
49 html,body{font-size:100%}
50 body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;line-height:1;position:relative;cursor:auto;-moz-tab-size:4;-o-tab-size:4;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
51 a:hover{cursor:pointer}
52 img,object,embed{max-width:100%;height:auto}
53 object,embed{height:100%}
54 img{-ms-interpolation-mode:bicubic}
55 .left{float:left!important}
56 .right{float:right!important}
57 .text-left{text-align:left!important}
58 .text-right{text-align:right!important}
59 .text-center{text-align:center!important}
60 .text-justify{text-align:justify!important}
61 .hide{display:none}
62 img,object,svg{display:inline-block;vertical-align:middle}
63 textarea{height:auto;min-height:50px}
64 select{width:100%}
65 .subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
66 div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
67 a{color:#2156a5;text-decoration:underline;line-height:inherit}
68 a:hover,a:focus{color:#1d4b8f}
69 a img{border:0}
70 p{line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
71 p aside{font-size:.875em;line-height:1.35;font-style:italic}
72 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
73 h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
74 h1{font-size:2.125em}
75 h2{font-size:1.6875em}
76 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
77 h4,h5{font-size:1.125em}
78 h6{font-size:1em}
79 hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em}
80 em,i{font-style:italic;line-height:inherit}
81 strong,b{font-weight:bold;line-height:inherit}
82 small{font-size:60%;line-height:inherit}
83 code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
84 ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
85 ul,ol{margin-left:1.5em}
86 ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0}
87 ul.circle{list-style-type:circle}
88 ul.disc{list-style-type:disc}
89 ul.square{list-style-type:square}
90 ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91 ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
92 dl dt{margin-bottom:.3125em;font-weight:bold}
93 dl dd{margin-bottom:1.25em}
94 blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
95 blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
96 @media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
97 h1{font-size:2.75em}
98 h2{font-size:2.3125em}
99 h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
100 h4{font-size:1.4375em}}
101 table{background:#fff;margin-bottom:1.25em;border:1px solid #dedede;word-wrap:normal}
102 table thead,table tfoot{background:#f7f8f7}
103 table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
104 table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
105 table tr.even,table tr.alt{background:#f8f8f7}
106 table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:1.6}
107 h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
108 h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
109 .center{margin-left:auto;margin-right:auto}
110 .stretch{width:100%}
111 .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
112 .clearfix::after,.float-group::after{clear:both}
113 :not(pre).nobreak{word-wrap:normal}
114 :not(pre).nowrap{white-space:nowrap}
115 :not(pre).pre-wrap{white-space:pre-wrap}
116 :not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
117 pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
118 pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119 pre>code{display:block}
120 pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121 em em{font-style:normal}
122 strong strong{font-weight:400}
123 .keyseq{color:rgba(51,51,51,.8)}
124 kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;border-radius:3px;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 0 0 .1em #fff;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
125 .keyseq kbd:first-child{margin-left:0}
126 .keyseq kbd:last-child{margin-right:0}
127 .menuseq,.menuref{color:#000}
128 .menuseq b:not(.caret),.menuref{font-weight:inherit}
129 .menuseq{word-spacing:-.02em}
130 .menuseq b.caret{font-size:1.25em;line-height:.8}
131 .menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
132 b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
133 b.button::before{content:"[";padding:0 3px 0 2px}
134 b.button::after{content:"]";padding:0 2px 0 3px}
135 p a>code:hover{color:rgba(0,0,0,.9)}
136 #header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
137 #header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
138 #header::after,#content::after,#footnotes::after,#footer::after{clear:both}
139 #content{margin-top:1.25em}
140 #content::before{content:none}
141 #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
142 #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
143 #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
144 #header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
145 #header .details span:first-child{margin-left:-.125em}
146 #header .details span.email a{color:rgba(0,0,0,.85)}
147 #header .details br{display:none}
148 #header .details br+span::before{content:"\00a0\2013\00a0"}
149 #header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
150 #header .details br+span#revremark::before{content:"\00a0|\00a0"}
151 #header #revnumber{text-transform:capitalize}
152 #header #revnumber::after{content:"\00a0"}
153 #content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
154 #toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
155 #toc>ul{margin-left:.125em}
156 #toc ul.sectlevel0>li>a{font-style:italic}
157 #toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
158 #toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
159 #toc li{line-height:1.3334;margin-top:.3334em}
160 #toc a{text-decoration:none}
161 #toc a:active{text-decoration:underline}
162 #toctitle{color:#7a2518;font-size:1.2em}
163 @media screen and (min-width:768px){#toctitle{font-size:1.375em}
164 body.toc2{padding-left:15em;padding-right:0}
165 #toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
166 #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
167 #toc.toc2>ul{font-size:.9em;margin-bottom:0}
168 #toc.toc2 ul ul{margin-left:0;padding-left:1em}
169 #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
170 body.toc2.toc-right{padding-left:0;padding-right:15em}
171 body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
172 @media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
173 #toc.toc2{width:20em}
174 #toc.toc2 #toctitle{font-size:1.375em}
175 #toc.toc2>ul{font-size:.95em}
176 #toc.toc2 ul ul{padding-left:1.25em}
177 body.toc2.toc-right{padding-left:0;padding-right:20em}}
178 #content #toc{border:1px solid #e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;border-radius:4px}
179 #content #toc>:first-child{margin-top:0}
180 #content #toc>:last-child{margin-bottom:0}
181 #footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
182 #footer-text{color:hsla(0,0%,100%,.8);line-height:1.44}
183 #content{margin-bottom:.625em}
184 .sect1{padding-bottom:.625em}
185 @media screen and (min-width:768px){#content{margin-bottom:1.25em}
186 .sect1{padding-bottom:1.25em}}
187 .sect1:last-child{padding-bottom:0}
188 .sect1+.sect1{border-top:1px solid #e7e7e9}
189 #content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
190 #content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
191 #content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
192 #content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
193 #content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
194 details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
195 details{margin-left:1.25rem}
196 details>summary{cursor:pointer;display:block;position:relative;line-height:1.6;margin-bottom:.625rem;outline:none;-webkit-tap-highlight-color:transparent}
197 details>summary::-webkit-details-marker{display:none}
198 details>summary::before{content:"";border:solid transparent;border-left:solid;border-width:.3em 0 .3em .5em;position:absolute;top:.5em;left:-1.25rem;transform:translateX(15%)}
199 details[open]>summary::before{border:solid transparent;border-top:solid;border-width:.5em .3em 0;transform:translateY(15%)}
200 details>summary::after{content:"";width:1.25rem;height:1em;position:absolute;top:.3em;left:-1.25rem}
201 .admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
202 table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
203 .paragraph.lead>p,#preamble>.sectionbody>[class=paragraph]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
204 .admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
205 .admonitionblock>table td.icon{text-align:center;width:80px}
206 .admonitionblock>table td.icon img{max-width:none}
207 .admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
208 .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
209 .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
210 .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
211 .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
212 .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
213 .exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
214 .exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
215 .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
216 @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
217 @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
218 .literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class=highlight],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
219 .literalblock.output pre{color:#f7f7f8;background:rgba(0,0,0,.9)}
220 .listingblock>.content{position:relative}
221 .listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:inherit;opacity:.5}
222 .listingblock:hover code[data-lang]::before{display:block}
223 .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:inherit;opacity:.5}
224 .listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
225 .listingblock pre.highlightjs{padding:0}
226 .listingblock pre.highlightjs>code{padding:1em;border-radius:4px}
227 .listingblock pre.prettyprint{border-width:0}
228 .prettyprint{background:#f7f7f8}
229 pre.prettyprint .linenums{line-height:1.45;margin-left:2em}
230 pre.prettyprint li{background:none;list-style-type:inherit;padding-left:0}
231 pre.prettyprint li code[data-lang]::before{opacity:1}
232 pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
233 table.linenotable{border-collapse:separate;border:0;margin-bottom:0;background:none}
234 table.linenotable td[class]{color:inherit;vertical-align:top;padding:0;line-height:inherit;white-space:normal}
235 table.linenotable td.code{padding-left:.75em}
236 table.linenotable td.linenos,pre.pygments .linenos{border-right:1px solid;opacity:.35;padding-right:.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
237 pre.pygments span.linenos{display:inline-block;margin-right:.75em}
238 .quoteblock{margin:0 1em 1.25em 1.5em;display:table}
239 .quoteblock:not(.excerpt)>.title{margin-left:-1.5em;margin-bottom:.75em}
240 .quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
241 .quoteblock blockquote{margin:0;padding:0;border:0}
242 .quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
243 .quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
244 .quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
245 .verseblock{margin:0 1em 1.25em}
246 .verseblock pre{font-family:"Open Sans","DejaVu Sans",sans-serif;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
247 .verseblock pre strong{font-weight:400}
248 .verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
249 .quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
250 .quoteblock .attribution br,.verseblock .attribution br{display:none}
251 .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
252 .quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
253 .quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
254 .quoteblock.abstract{margin:0 1em 1.25em;display:block}
255 .quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
256 .quoteblock.excerpt>blockquote,.quoteblock .quoteblock{padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
257 .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
258 .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
259 .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:.85rem;text-align:left;margin-right:0}
260 p.tableblock:last-child{margin-bottom:0}
261 td.tableblock>.content{margin-bottom:1.25em;word-wrap:anywhere}
262 td.tableblock>.content>:last-child{margin-bottom:-1.25em}
263 table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
264 table.grid-all>*>tr>*{border-width:1px}
265 table.grid-cols>*>tr>*{border-width:0 1px}
266 table.grid-rows>*>tr>*{border-width:1px 0}
267 table.frame-all{border-width:1px}
268 table.frame-ends{border-width:1px 0}
269 table.frame-sides{border-width:0 1px}
270 table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
271 table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
272 table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
273 table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
274 table.stripes-all>*>tr,table.stripes-odd>*>tr:nth-of-type(odd),table.stripes-even>*>tr:nth-of-type(even),table.stripes-hover>*>tr:hover{background:#f8f8f7}
275 th.halign-left,td.halign-left{text-align:left}
276 th.halign-right,td.halign-right{text-align:right}
277 th.halign-center,td.halign-center{text-align:center}
278 th.valign-top,td.valign-top{vertical-align:top}
279 th.valign-bottom,td.valign-bottom{vertical-align:bottom}
280 th.valign-middle,td.valign-middle{vertical-align:middle}
281 table thead th,table tfoot th{font-weight:bold}
282 tbody tr th{background:#f7f8f7}
283 tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
284 p.tableblock>code:only-child{background:none;padding:0}
285 p.tableblock{font-size:1em}
286 ol{margin-left:1.75em}
287 ul li ol{margin-left:1.5em}
288 dl dd{margin-left:1.125em}
289 dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
290 li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
291 ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
292 ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
293 ul.unstyled,ol.unstyled{margin-left:0}
294 li>p:empty:only-child::before{content:"";display:inline-block}
295 ul.checklist>li>p:first-child{margin-left:-1em}
296 ul.checklist>li>p:first-child>.fa-square-o:first-child,ul.checklist>li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
297 ul.checklist>li>p:first-child>input[type=checkbox]:first-child{margin-right:.25em}
298 ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
299 ul.inline>li{margin-left:1.25em}
300 .unstyled dl dt{font-weight:400;font-style:normal}
301 ol.arabic{list-style-type:decimal}
302 ol.decimal{list-style-type:decimal-leading-zero}
303 ol.loweralpha{list-style-type:lower-alpha}
304 ol.upperalpha{list-style-type:upper-alpha}
305 ol.lowerroman{list-style-type:lower-roman}
306 ol.upperroman{list-style-type:upper-roman}
307 ol.lowergreek{list-style-type:lower-greek}
308 .hdlist>table,.colist>table{border:0;background:none}
309 .hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
310 td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
311 td.hdlist1{font-weight:bold;padding-bottom:1.25em}
312 td.hdlist2{word-wrap:anywhere}
313 .literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
314 .colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
315 .colist td:not([class]):first-child img{max-width:none}
316 .colist td:not([class]):last-child{padding:.25em 0}
317 .thumb,.th{line-height:0;display:inline-block;border:4px solid #fff;box-shadow:0 0 0 1px #ddd}
318 .imageblock.left{margin:.25em .625em 1.25em 0}
319 .imageblock.right{margin:.25em 0 1.25em .625em}
320 .imageblock>.title{margin-bottom:0}
321 .imageblock.thumb,.imageblock.th{border-width:6px}
322 .imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
323 .image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
324 .image.left{margin-right:.625em}
325 .image.right{margin-left:.625em}
326 a.image{text-decoration:none;display:inline-block}
327 a.image object{pointer-events:none}
328 sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
329 sup.footnote a,sup.footnoteref a{text-decoration:none}
330 sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
331 #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
332 #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
333 #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
334 #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
335 #footnotes .footnote:last-of-type{margin-bottom:0}
336 #content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
337 div.unbreakable{page-break-inside:avoid}
338 .big{font-size:larger}
339 .small{font-size:smaller}
340 .underline{text-decoration:underline}
341 .overline{text-decoration:overline}
342 .line-through{text-decoration:line-through}
343 .aqua{color:#00bfbf}
344 .aqua-background{background:#00fafa}
345 .black{color:#000}
346 .black-background{background:#000}
347 .blue{color:#0000bf}
348 .blue-background{background:#0000fa}
349 .fuchsia{color:#bf00bf}
350 .fuchsia-background{background:#fa00fa}
351 .gray{color:#606060}
352 .gray-background{background:#7d7d7d}
353 .green{color:#006000}
354 .green-background{background:#007d00}
355 .lime{color:#00bf00}
356 .lime-background{background:#00fa00}
357 .maroon{color:#600000}
358 .maroon-background{background:#7d0000}
359 .navy{color:#000060}
360 .navy-background{background:#00007d}
361 .olive{color:#606000}
362 .olive-background{background:#7d7d00}
363 .purple{color:#600060}
364 .purple-background{background:#7d007d}
365 .red{color:#bf0000}
366 .red-background{background:#fa0000}
367 .silver{color:#909090}
368 .silver-background{background:#bcbcbc}
369 .teal{color:#006060}
370 .teal-background{background:#007d7d}
371 .white{color:#bfbfbf}
372 .white-background{background:#fafafa}
373 .yellow{color:#bfbf00}
374 .yellow-background{background:#fafa00}
375 span.icon>.fa{cursor:default}
376 a span.icon>.fa{cursor:inherit}
377 .admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
378 .admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
379 .admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
380 .admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
381 .admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
382 .admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
383 .conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
384 .conum[data-value] *{color:#fff!important}
385 .conum[data-value]+b{display:none}
386 .conum[data-value]::after{content:attr(data-value)}
387 pre .conum[data-value]{position:relative;top:-.125em}
388 b.conum *{color:inherit!important}
389 .conum:not([data-value]):empty{display:none}
390 dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
391 h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
392 p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
393 p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
394 p{margin-bottom:1.25rem}
395 .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
396 .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
397 .print-only{display:none!important}
398 @page{margin:1.25cm .75cm}
399 @media print{*{box-shadow:none!important;text-shadow:none!important}
400 html{font-size:80%}
401 a{color:inherit!important;text-decoration:underline!important}
402 a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
403 a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
404 abbr[title]{border-bottom:1px dotted}
405 abbr[title]::after{content:" (" attr(title) ")"}
406 pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
407 thead{display:table-header-group}
408 svg{max-width:100%}
409 p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
410 h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
411 #header,#content,#footnotes,#footer{max-width:none}
412 #toc,.sidebarblock,.exampleblock>.content{background:none!important}
413 #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
414 body.book #header{text-align:center}
415 body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
416 body.book #header .details{border:0!important;display:block;padding:0!important}
417 body.book #header .details span:first-child{margin-left:0!important}
418 body.book #header .details br{display:block}
419 body.book #header .details br+span::before{content:none!important}
420 body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
421 body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
422 .listingblock code[data-lang]::before{display:block}
423 #footer{padding:0 .9375em}
424 .hide-on-print{display:none!important}
425 .print-only{display:block!important}
426 .hide-for-print{display:none!important}
427 .show-for-print{display:inherit!important}}
428 @media amzn-kf8,print{#header>h1:first-child{margin-top:1.25rem}
429 .sect1{padding:0!important}
430 .sect1+.sect1{border:0}
431 #footer{background:none}
432 #footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
433 @media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
434 </style>
435 <style>
436 pre>code {
437 display: inline;
439 </style>
440 </head>
441 <body class="manpage">
442 <div id="header">
443 <h1>git-fetch(1) Manual Page</h1>
444 <h2 id="_name">NAME</h2>
445 <div class="sectionbody">
446 <p>git-fetch - Download objects and refs from another repository</p>
447 </div>
448 </div>
449 <div id="content">
450 <div class="sect1">
451 <h2 id="_synopsis">SYNOPSIS</h2>
452 <div class="sectionbody">
453 <div class="verseblock">
454 <pre class="content"><em>git fetch</em> [&lt;options&gt;] [&lt;repository&gt; [&lt;refspec&gt;&#8230;&#8203;]]
455 <em>git fetch</em> [&lt;options&gt;] &lt;group&gt;
456 <em>git fetch</em> --multiple [&lt;options&gt;] [(&lt;repository&gt; | &lt;group&gt;)&#8230;&#8203;]
457 <em>git fetch</em> --all [&lt;options&gt;]</pre>
458 </div>
459 </div>
460 </div>
461 <div class="sect1">
462 <h2 id="_description">DESCRIPTION</h2>
463 <div class="sectionbody">
464 <div class="paragraph">
465 <p>Fetch branches and/or tags (collectively, "refs") from one or more
466 other repositories, along with the objects necessary to complete their
467 histories. Remote-tracking branches are updated (see the description
468 of &lt;refspec&gt; below for ways to control this behavior).</p>
469 </div>
470 <div class="paragraph">
471 <p>By default, any tag that points into the histories being fetched is
472 also fetched; the effect is to fetch tags that
473 point at branches that you are interested in. This default behavior
474 can be changed by using the --tags or --no-tags options or by
475 configuring remote.&lt;name&gt;.tagOpt. By using a refspec that fetches tags
476 explicitly, you can fetch tags that do not point into branches you
477 are interested in as well.</p>
478 </div>
479 <div class="paragraph">
480 <p><em>git fetch</em> can fetch from either a single named repository or URL,
481 or from several repositories at once if &lt;group&gt; is given and
482 there is a remotes.&lt;group&gt; entry in the configuration file.
483 (See <a href="git-config.html">git-config(1)</a>).</p>
484 </div>
485 <div class="paragraph">
486 <p>When no remote is specified, by default the <code>origin</code> remote will be used,
487 unless there&#8217;s an upstream branch configured for the current branch.</p>
488 </div>
489 <div class="paragraph">
490 <p>The names of refs that are fetched, together with the object names
491 they point at, are written to <code>.git/FETCH_HEAD</code>. This information
492 may be used by scripts or other git commands, such as <a href="git-pull.html">git-pull(1)</a>.</p>
493 </div>
494 </div>
495 </div>
496 <div class="sect1">
497 <h2 id="_options">OPTIONS</h2>
498 <div class="sectionbody">
499 <div class="dlist">
500 <dl>
501 <dt class="hdlist1">--[no-]all</dt>
502 <dd>
503 <p>Fetch all remotes. This overrides the configuration variable
504 <code>fetch.all</code>.</p>
505 </dd>
506 <dt class="hdlist1">-a</dt>
507 <dt class="hdlist1">--append</dt>
508 <dd>
509 <p>Append ref names and object names of fetched refs to the
510 existing contents of <code>.git/FETCH_HEAD</code>. Without this
511 option old data in <code>.git/FETCH_HEAD</code> will be overwritten.</p>
512 </dd>
513 <dt class="hdlist1">--atomic</dt>
514 <dd>
515 <p>Use an atomic transaction to update local refs. Either all refs are
516 updated, or on error, no refs are updated.</p>
517 </dd>
518 <dt class="hdlist1">--depth=&lt;depth&gt;</dt>
519 <dd>
520 <p>Limit fetching to the specified number of commits from the tip of
521 each remote branch history. If fetching to a <em>shallow</em> repository
522 created by <code>git clone</code> with <code>--depth=&lt;depth&gt;</code> option (see
523 <a href="git-clone.html">git-clone(1)</a>), deepen or shorten the history to the specified
524 number of commits. Tags for the deepened commits are not fetched.</p>
525 </dd>
526 <dt class="hdlist1">--deepen=&lt;depth&gt;</dt>
527 <dd>
528 <p>Similar to --depth, except it specifies the number of commits
529 from the current shallow boundary instead of from the tip of
530 each remote branch history.</p>
531 </dd>
532 <dt class="hdlist1">--shallow-since=&lt;date&gt;</dt>
533 <dd>
534 <p>Deepen or shorten the history of a shallow repository to
535 include all reachable commits after &lt;date&gt;.</p>
536 </dd>
537 <dt class="hdlist1">--shallow-exclude=&lt;revision&gt;</dt>
538 <dd>
539 <p>Deepen or shorten the history of a shallow repository to
540 exclude commits reachable from a specified remote branch or tag.
541 This option can be specified multiple times.</p>
542 </dd>
543 <dt class="hdlist1">--unshallow</dt>
544 <dd>
545 <p>If the source repository is complete, convert a shallow
546 repository to a complete one, removing all the limitations
547 imposed by shallow repositories.</p>
548 <div class="paragraph">
549 <p>If the source repository is shallow, fetch as much as possible so that
550 the current repository has the same history as the source repository.</p>
551 </div>
552 </dd>
553 <dt class="hdlist1">--update-shallow</dt>
554 <dd>
555 <p>By default when fetching from a shallow repository,
556 <code>git fetch</code> refuses refs that require updating
557 .git/shallow. This option updates .git/shallow and accepts such
558 refs.</p>
559 </dd>
560 <dt class="hdlist1">--negotiation-tip=&lt;commit|glob&gt;</dt>
561 <dd>
562 <p>By default, Git will report, to the server, commits reachable
563 from all local refs to find common commits in an attempt to
564 reduce the size of the to-be-received packfile. If specified,
565 Git will only report commits reachable from the given tips.
566 This is useful to speed up fetches when the user knows which
567 local ref is likely to have commits in common with the
568 upstream ref being fetched.</p>
569 <div class="paragraph">
570 <p>This option may be specified more than once; if so, Git will report
571 commits reachable from any of the given commits.</p>
572 </div>
573 <div class="paragraph">
574 <p>The argument to this option may be a glob on ref names, a ref, or the (possibly
575 abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying
576 this option multiple times, one for each matching ref name.</p>
577 </div>
578 <div class="paragraph">
579 <p>See also the <code>fetch.negotiationAlgorithm</code> and <code>push.negotiate</code>
580 configuration variables documented in <a href="git-config.html">git-config(1)</a>, and the
581 <code>--negotiate-only</code> option below.</p>
582 </div>
583 </dd>
584 <dt class="hdlist1">--negotiate-only</dt>
585 <dd>
586 <p>Do not fetch anything from the server, and instead print the
587 ancestors of the provided <code>--negotiation-tip=*</code> arguments,
588 which we have in common with the server.</p>
589 <div class="paragraph">
590 <p>This is incompatible with <code>--recurse-submodules=[yes|on-demand]</code>.
591 Internally this is used to implement the <code>push.negotiate</code> option, see
592 <a href="git-config.html">git-config(1)</a>.</p>
593 </div>
594 </dd>
595 <dt class="hdlist1">--dry-run</dt>
596 <dd>
597 <p>Show what would be done, without making any changes.</p>
598 </dd>
599 <dt class="hdlist1">--porcelain</dt>
600 <dd>
601 <p>Print the output to standard output in an easy-to-parse format for
602 scripts. See section OUTPUT in <a href="git-fetch.html">git-fetch(1)</a> for details.</p>
603 <div class="paragraph">
604 <p>This is incompatible with <code>--recurse-submodules=[yes|on-demand]</code> and takes
605 precedence over the <code>fetch.output</code> config option.</p>
606 </div>
607 </dd>
608 <dt class="hdlist1">--[no-]write-fetch-head</dt>
609 <dd>
610 <p>Write the list of remote refs fetched in the <code>FETCH_HEAD</code>
611 file directly under <code>$GIT_DIR</code>. This is the default.
612 Passing <code>--no-write-fetch-head</code> from the command line tells
613 Git not to write the file. Under <code>--dry-run</code> option, the
614 file is never written.</p>
615 </dd>
616 <dt class="hdlist1">-f</dt>
617 <dt class="hdlist1">--force</dt>
618 <dd>
619 <p>When <em>git fetch</em> is used with <code>&lt;src&gt;:&lt;dst&gt;</code> refspec, it may
620 refuse to update the local branch as discussed
621 in the <code>&lt;refspec&gt;</code> part below.
622 This option overrides that check.</p>
623 </dd>
624 <dt class="hdlist1">-k</dt>
625 <dt class="hdlist1">--keep</dt>
626 <dd>
627 <p>Keep downloaded pack.</p>
628 </dd>
629 <dt class="hdlist1">--multiple</dt>
630 <dd>
631 <p>Allow several &lt;repository&gt; and &lt;group&gt; arguments to be
632 specified. No &lt;refspec&gt;s may be specified.</p>
633 </dd>
634 <dt class="hdlist1">--[no-]auto-maintenance</dt>
635 <dt class="hdlist1">--[no-]auto-gc</dt>
636 <dd>
637 <p>Run <code>git maintenance run --auto</code> at the end to perform automatic
638 repository maintenance if needed. (<code>--[no-]auto-gc</code> is a synonym.)
639 This is enabled by default.</p>
640 </dd>
641 <dt class="hdlist1">--[no-]write-commit-graph</dt>
642 <dd>
643 <p>Write a commit-graph after fetching. This overrides the config
644 setting <code>fetch.writeCommitGraph</code>.</p>
645 </dd>
646 <dt class="hdlist1">--prefetch</dt>
647 <dd>
648 <p>Modify the configured refspec to place all refs into the
649 <code>refs/prefetch/</code> namespace. See the <code>prefetch</code> task in
650 <a href="git-maintenance.html">git-maintenance(1)</a>.</p>
651 </dd>
652 <dt class="hdlist1">-p</dt>
653 <dt class="hdlist1">--prune</dt>
654 <dd>
655 <p>Before fetching, remove any remote-tracking references that no
656 longer exist on the remote. Tags are not subject to pruning
657 if they are fetched only because of the default tag
658 auto-following or due to a --tags option. However, if tags
659 are fetched due to an explicit refspec (either on the command
660 line or in the remote configuration, for example if the remote
661 was cloned with the --mirror option), then they are also
662 subject to pruning. Supplying <code>--prune-tags</code> is a shorthand for
663 providing the tag refspec.</p>
664 <div class="paragraph">
665 <p>See the PRUNING section below for more details.</p>
666 </div>
667 </dd>
668 <dt class="hdlist1">-P</dt>
669 <dt class="hdlist1">--prune-tags</dt>
670 <dd>
671 <p>Before fetching, remove any local tags that no longer exist on
672 the remote if <code>--prune</code> is enabled. This option should be used
673 more carefully, unlike <code>--prune</code> it will remove any local
674 references (local tags) that have been created. This option is
675 a shorthand for providing the explicit tag refspec along with
676 <code>--prune</code>, see the discussion about that in its documentation.</p>
677 <div class="paragraph">
678 <p>See the PRUNING section below for more details.</p>
679 </div>
680 </dd>
681 <dt class="hdlist1">-n</dt>
682 <dt class="hdlist1">--no-tags</dt>
683 <dd>
684 <p>By default, tags that point at objects that are downloaded
685 from the remote repository are fetched and stored locally.
686 This option disables this automatic tag following. The default
687 behavior for a remote may be specified with the remote.&lt;name&gt;.tagOpt
688 setting. See <a href="git-config.html">git-config(1)</a>.</p>
689 </dd>
690 <dt class="hdlist1">--refetch</dt>
691 <dd>
692 <p>Instead of negotiating with the server to avoid transferring commits and
693 associated objects that are already present locally, this option fetches
694 all objects as a fresh clone would. Use this to reapply a partial clone
695 filter from configuration or using <code>--filter=</code> when the filter
696 definition has changed. Automatic post-fetch maintenance will perform
697 object database pack consolidation to remove any duplicate objects.</p>
698 </dd>
699 <dt class="hdlist1">--refmap=&lt;refspec&gt;</dt>
700 <dd>
701 <p>When fetching refs listed on the command line, use the
702 specified refspec (can be given more than once) to map the
703 refs to remote-tracking branches, instead of the values of
704 <code>remote.*.fetch</code> configuration variables for the remote
705 repository. Providing an empty <code>&lt;refspec&gt;</code> to the
706 <code>--refmap</code> option causes Git to ignore the configured
707 refspecs and rely entirely on the refspecs supplied as
708 command-line arguments. See section on "Configured Remote-tracking
709 Branches" for details.</p>
710 </dd>
711 <dt class="hdlist1">-t</dt>
712 <dt class="hdlist1">--tags</dt>
713 <dd>
714 <p>Fetch all tags from the remote (i.e., fetch remote tags
715 <code>refs/tags/*</code> into local tags with the same name), in addition
716 to whatever else would otherwise be fetched. Using this
717 option alone does not subject tags to pruning, even if --prune
718 is used (though tags may be pruned anyway if they are also the
719 destination of an explicit refspec; see <code>--prune</code>).</p>
720 </dd>
721 <dt class="hdlist1">--recurse-submodules[=(yes|on-demand|no)]</dt>
722 <dd>
723 <p>This option controls if and under what conditions new commits of
724 submodules should be fetched too. When recursing through submodules,
725 <code>git fetch</code> always attempts to fetch "changed" submodules, that is, a
726 submodule that has commits that are referenced by a newly fetched
727 superproject commit but are missing in the local submodule clone. A
728 changed submodule can be fetched as long as it is present locally e.g.
729 in <code>$GIT_DIR/modules/</code> (see <a href="gitsubmodules.html">gitsubmodules(7)</a>); if the upstream
730 adds a new submodule, that submodule cannot be fetched until it is
731 cloned e.g. by <code>git submodule update</code>.</p>
732 <div class="paragraph">
733 <p>When set to <em>on-demand</em>, only changed submodules are fetched. When set
734 to <em>yes</em>, all populated submodules are fetched and submodules that are
735 both unpopulated and changed are fetched. When set to <em>no</em>, submodules
736 are never fetched.</p>
737 </div>
738 <div class="paragraph">
739 <p>When unspecified, this uses the value of <code>fetch.recurseSubmodules</code> if it
740 is set (see <a href="git-config.html">git-config(1)</a>), defaulting to <em>on-demand</em> if unset.
741 When this option is used without any value, it defaults to <em>yes</em>.</p>
742 </div>
743 </dd>
744 <dt class="hdlist1">-j</dt>
745 <dt class="hdlist1">--jobs=&lt;n&gt;</dt>
746 <dd>
747 <p>Number of parallel children to be used for all forms of fetching.</p>
748 <div class="paragraph">
749 <p>If the <code>--multiple</code> option was specified, the different remotes will be fetched
750 in parallel. If multiple submodules are fetched, they will be fetched in
751 parallel. To control them independently, use the config settings
752 <code>fetch.parallel</code> and <code>submodule.fetchJobs</code> (see <a href="git-config.html">git-config(1)</a>).</p>
753 </div>
754 <div class="paragraph">
755 <p>Typically, parallel recursive and multi-remote fetches will be faster. By
756 default fetches are performed sequentially, not in parallel.</p>
757 </div>
758 </dd>
759 <dt class="hdlist1">--no-recurse-submodules</dt>
760 <dd>
761 <p>Disable recursive fetching of submodules (this has the same effect as
762 using the <code>--recurse-submodules=no</code> option).</p>
763 </dd>
764 <dt class="hdlist1">--set-upstream</dt>
765 <dd>
766 <p>If the remote is fetched successfully, add upstream
767 (tracking) reference, used by argument-less
768 <a href="git-pull.html">git-pull(1)</a> and other commands. For more information,
769 see <code>branch.&lt;name&gt;.merge</code> and <code>branch.&lt;name&gt;.remote</code> in
770 <a href="git-config.html">git-config(1)</a>.</p>
771 </dd>
772 <dt class="hdlist1">--submodule-prefix=&lt;path&gt;</dt>
773 <dd>
774 <p>Prepend &lt;path&gt; to paths printed in informative messages
775 such as "Fetching submodule foo". This option is used
776 internally when recursing over submodules.</p>
777 </dd>
778 <dt class="hdlist1">--recurse-submodules-default=[yes|on-demand]</dt>
779 <dd>
780 <p>This option is used internally to temporarily provide a
781 non-negative default value for the --recurse-submodules
782 option. All other methods of configuring fetch&#8217;s submodule
783 recursion (such as settings in <a href="gitmodules.html">gitmodules(5)</a> and
784 <a href="git-config.html">git-config(1)</a>) override this option, as does
785 specifying --[no-]recurse-submodules directly.</p>
786 </dd>
787 <dt class="hdlist1">-u</dt>
788 <dt class="hdlist1">--update-head-ok</dt>
789 <dd>
790 <p>By default <em>git fetch</em> refuses to update the head which
791 corresponds to the current branch. This flag disables the
792 check. This is purely for the internal use for <em>git pull</em>
793 to communicate with <em>git fetch</em>, and unless you are
794 implementing your own Porcelain you are not supposed to
795 use it.</p>
796 </dd>
797 <dt class="hdlist1">--upload-pack &lt;upload-pack&gt;</dt>
798 <dd>
799 <p>When given, and the repository to fetch from is handled
800 by <em>git fetch-pack</em>, <code>--exec=&lt;upload-pack&gt;</code> is passed to
801 the command to specify non-default path for the command
802 run on the other end.</p>
803 </dd>
804 <dt class="hdlist1">-q</dt>
805 <dt class="hdlist1">--quiet</dt>
806 <dd>
807 <p>Pass --quiet to git-fetch-pack and silence any other internally
808 used git commands. Progress is not reported to the standard error
809 stream.</p>
810 </dd>
811 <dt class="hdlist1">-v</dt>
812 <dt class="hdlist1">--verbose</dt>
813 <dd>
814 <p>Be verbose.</p>
815 </dd>
816 <dt class="hdlist1">--progress</dt>
817 <dd>
818 <p>Progress status is reported on the standard error stream
819 by default when it is attached to a terminal, unless -q
820 is specified. This flag forces progress status even if the
821 standard error stream is not directed to a terminal.</p>
822 </dd>
823 <dt class="hdlist1">-o &lt;option&gt;</dt>
824 <dt class="hdlist1">--server-option=&lt;option&gt;</dt>
825 <dd>
826 <p>Transmit the given string to the server when communicating using
827 protocol version 2. The given string must not contain a NUL or LF
828 character. The server&#8217;s handling of server options, including
829 unknown ones, is server-specific.
830 When multiple <code>--server-option=&lt;option&gt;</code> are given, they are all
831 sent to the other side in the order listed on the command line.</p>
832 </dd>
833 <dt class="hdlist1">--show-forced-updates</dt>
834 <dd>
835 <p>By default, git checks if a branch is force-updated during
836 fetch. This can be disabled through fetch.showForcedUpdates, but
837 the --show-forced-updates option guarantees this check occurs.
838 See <a href="git-config.html">git-config(1)</a>.</p>
839 </dd>
840 <dt class="hdlist1">--no-show-forced-updates</dt>
841 <dd>
842 <p>By default, git checks if a branch is force-updated during
843 fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates
844 to false to skip this check for performance reasons. If used during
845 <em>git-pull</em> the --ff-only option will still check for forced updates
846 before attempting a fast-forward update. See <a href="git-config.html">git-config(1)</a>.</p>
847 </dd>
848 <dt class="hdlist1">-4</dt>
849 <dt class="hdlist1">--ipv4</dt>
850 <dd>
851 <p>Use IPv4 addresses only, ignoring IPv6 addresses.</p>
852 </dd>
853 <dt class="hdlist1">-6</dt>
854 <dt class="hdlist1">--ipv6</dt>
855 <dd>
856 <p>Use IPv6 addresses only, ignoring IPv4 addresses.</p>
857 </dd>
858 <dt class="hdlist1">&lt;repository&gt;</dt>
859 <dd>
860 <p>The "remote" repository that is the source of a fetch
861 or pull operation. This parameter can be either a URL
862 (see the section <a href="#URLS">GIT URLS</a> below) or the name
863 of a remote (see the section <a href="#REMOTES">REMOTES</a> below).</p>
864 </dd>
865 <dt class="hdlist1">&lt;group&gt;</dt>
866 <dd>
867 <p>A name referring to a list of repositories as the value
868 of remotes.&lt;group&gt; in the configuration file.
869 (See <a href="git-config.html">git-config(1)</a>).</p>
870 </dd>
871 <dt class="hdlist1">&lt;refspec&gt;</dt>
872 <dd>
873 <p>Specifies which refs to fetch and which local refs to update.
874 When no &lt;refspec&gt;s appear on the command line, the refs to fetch
875 are read from <code>remote.&lt;repository&gt;.fetch</code> variables instead
876 (see <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> below).</p>
877 <div class="paragraph">
878 <p>The format of a &lt;refspec&gt; parameter is an optional plus
879 <code>+</code>, followed by the source &lt;src&gt;, followed
880 by a colon <code>:</code>, followed by the destination ref &lt;dst&gt;.
881 The colon can be omitted when &lt;dst&gt; is empty. &lt;src&gt; is
882 typically a ref, but it can also be a fully spelled hex object
883 name.</p>
884 </div>
885 <div class="paragraph">
886 <p>A &lt;refspec&gt; may contain a <code>*</code> in its &lt;src&gt; to indicate a simple pattern
887 match. Such a refspec functions like a glob that matches any ref with the
888 same prefix. A pattern &lt;refspec&gt; must have a <code>*</code> in both the &lt;src&gt; and
889 &lt;dst&gt;. It will map refs to the destination by replacing the <code>*</code> with the
890 contents matched from the source.</p>
891 </div>
892 <div class="paragraph">
893 <p>If a refspec is prefixed by <code>^</code>, it will be interpreted as a negative
894 refspec. Rather than specifying which refs to fetch or which local refs to
895 update, such a refspec will instead specify refs to exclude. A ref will be
896 considered to match if it matches at least one positive refspec, and does
897 not match any negative refspec. Negative refspecs can be useful to restrict
898 the scope of a pattern refspec so that it will not include specific refs.
899 Negative refspecs can themselves be pattern refspecs. However, they may only
900 contain a &lt;src&gt; and do not specify a &lt;dst&gt;. Fully spelled out hex object
901 names are also not supported.</p>
902 </div>
903 <div class="paragraph">
904 <p><code>tag &lt;tag&gt;</code> means the same as <code>refs/tags/&lt;tag&gt;:refs/tags/&lt;tag&gt;</code>;
905 it requests fetching everything up to the given tag.</p>
906 </div>
907 <div class="paragraph">
908 <p>The remote ref that matches &lt;src&gt;
909 is fetched, and if &lt;dst&gt; is not an empty string, an attempt
910 is made to update the local ref that matches it.</p>
911 </div>
912 <div class="paragraph">
913 <p>Whether that update is allowed without <code>--force</code> depends on the ref
914 namespace it&#8217;s being fetched to, the type of object being fetched, and
915 whether the update is considered to be a fast-forward. Generally, the
916 same rules apply for fetching as when pushing, see the <code>&lt;refspec&gt;...</code>
917 section of <a href="git-push.html">git-push(1)</a> for what those are. Exceptions to those
918 rules particular to <em>git fetch</em> are noted below.</p>
919 </div>
920 <div class="paragraph">
921 <p>Until Git version 2.20, and unlike when pushing with
922 <a href="git-push.html">git-push(1)</a>, any updates to <code>refs/tags/*</code> would be accepted
923 without <code>+</code> in the refspec (or <code>--force</code>). When fetching, we promiscuously
924 considered all tag updates from a remote to be forced fetches. Since
925 Git version 2.20, fetching to update <code>refs/tags/*</code> works the same way
926 as when pushing. I.e. any updates will be rejected without <code>+</code> in the
927 refspec (or <code>--force</code>).</p>
928 </div>
929 <div class="paragraph">
930 <p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, any updates outside of
931 <code>refs/{tags,heads}/*</code> will be accepted without <code>+</code> in the refspec (or
932 <code>--force</code>), whether that&#8217;s swapping e.g. a tree object for a blob, or
933 a commit for another commit that doesn&#8217;t have the previous commit as
934 an ancestor etc.</p>
935 </div>
936 <div class="paragraph">
937 <p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, there is no
938 configuration which&#8217;ll amend these rules, and nothing like a
939 <code>pre-fetch</code> hook analogous to the <code>pre-receive</code> hook.</p>
940 </div>
941 <div class="paragraph">
942 <p>As with pushing with <a href="git-push.html">git-push(1)</a>, all of the rules described
943 above about what&#8217;s not allowed as an update can be overridden by
944 adding an optional leading <code>+</code> to a refspec (or using the <code>--force</code>
945 command line option). The only exception to this is that no amount of
946 forcing will make the <code>refs/heads/*</code> namespace accept a non-commit
947 object.</p>
948 </div>
949 <div class="admonitionblock note">
950 <table>
951 <tr>
952 <td class="icon">
953 <div class="title">Note</div>
954 </td>
955 <td class="content">
956 When the remote branch you want to fetch is known to
957 be rewound and rebased regularly, it is expected that
958 its new tip will not be a descendant of its previous tip
959 (as stored in your remote-tracking branch the last time
960 you fetched). You would want
961 to use the <code>+</code> sign to indicate non-fast-forward updates
962 will be needed for such branches. There is no way to
963 determine or declare that a branch will be made available
964 in a repository with this behavior; the pulling user simply
965 must know this is the expected usage pattern for a branch.
966 </td>
967 </tr>
968 </table>
969 </div>
970 </dd>
971 <dt class="hdlist1">--stdin</dt>
972 <dd>
973 <p>Read refspecs, one per line, from stdin in addition to those provided
974 as arguments. The "tag &lt;name&gt;" format is not supported.</p>
975 </dd>
976 </dl>
977 </div>
978 </div>
979 </div>
980 <div class="sect1">
981 <h2 id="_git_urls">GIT URLS<a id="URLS"></a></h2>
982 <div class="sectionbody">
983 <div class="paragraph">
984 <p>In general, URLs contain information about the transport protocol, the
985 address of the remote server, and the path to the repository.
986 Depending on the transport protocol, some of this information may be
987 absent.</p>
988 </div>
989 <div class="paragraph">
990 <p>Git supports ssh, git, http, and https protocols (in addition, ftp
991 and ftps can be used for fetching, but this is inefficient and
992 deprecated; do not use them).</p>
993 </div>
994 <div class="paragraph">
995 <p>The native transport (i.e. git:// URL) does no authentication and
996 should be used with caution on unsecured networks.</p>
997 </div>
998 <div class="paragraph">
999 <p>The following syntaxes may be used with them:</p>
1000 </div>
1001 <div class="ulist">
1002 <ul>
1003 <li>
1004 <p><code>ssh://</code>[<em>&lt;user&gt;</em><code>@</code>]<em>&lt;host&gt;</em>[<code>:</code><em>&lt;port&gt;</em>]<code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1005 </li>
1006 <li>
1007 <p><code>git://</code><em>&lt;host&gt;</em>[:<em>&lt;port&gt;</em>]<code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1008 </li>
1009 <li>
1010 <p><code>http</code>[<code>s</code>]<code>://</code><em>&lt;host&gt;</em>[<code>:</code><em>&lt;port&gt;</em>]<code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1011 </li>
1012 <li>
1013 <p><code>ftp</code>[<code>s</code>]<code>://</code><em>&lt;host&gt;</em>[<code>:</code><em>&lt;port&gt;</em>]<code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1014 </li>
1015 </ul>
1016 </div>
1017 <div class="paragraph">
1018 <p>An alternative scp-like syntax may also be used with the ssh protocol:</p>
1019 </div>
1020 <div class="ulist">
1021 <ul>
1022 <li>
1023 <p>[<em>&lt;user&gt;</em><code>@</code>]<em>&lt;host&gt;</em><code>:/</code><em>&lt;path-to-git-repo&gt;</em></p>
1024 </li>
1025 </ul>
1026 </div>
1027 <div class="paragraph">
1028 <p>This syntax is only recognized if there are no slashes before the
1029 first colon. This helps differentiate a local path that contains a
1030 colon. For example the local path <code>foo:bar</code> could be specified as an
1031 absolute path or <code>./foo:bar</code> to avoid being misinterpreted as an ssh
1032 url.</p>
1033 </div>
1034 <div class="paragraph">
1035 <p>The ssh and git protocols additionally support <code>~</code><em>&lt;username&gt;</em> expansion:</p>
1036 </div>
1037 <div class="ulist">
1038 <ul>
1039 <li>
1040 <p><code>ssh://</code>[<em>&lt;user&gt;</em><code>@</code>]<em>&lt;host&gt;</em>[<code>:</code><em>&lt;port&gt;</em>]<code>/~</code><em>&lt;user&gt;</em><code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1041 </li>
1042 <li>
1043 <p><code>git://</code><em>&lt;host&gt;</em>[<code>:</code><em>&lt;port&gt;</em>]<code>/~</code><em>&lt;user&gt;</em><code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1044 </li>
1045 <li>
1046 <p>[<em>&lt;user&gt;</em><code>@</code>]<em>&lt;host&gt;</em><code>:~</code><em>&lt;user&gt;</em><code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1047 </li>
1048 </ul>
1049 </div>
1050 <div class="paragraph">
1051 <p>For local repositories, also supported by Git natively, the following
1052 syntaxes may be used:</p>
1053 </div>
1054 <div class="ulist">
1055 <ul>
1056 <li>
1057 <p><code>/path/to/repo.git/</code></p>
1058 </li>
1059 <li>
1060 <p><code><a href="file:///path/to/repo.git/" class="bare">file:///path/to/repo.git/</a></code></p>
1061 </li>
1062 </ul>
1063 </div>
1064 <div class="paragraph">
1065 <p>These two syntaxes are mostly equivalent, except when cloning, when
1066 the former implies <code>--local</code> option. See <a href="git-clone.html">git-clone(1)</a> for
1067 details.</p>
1068 </div>
1069 <div class="paragraph">
1070 <p><code>git clone</code>, <code>git fetch</code> and <code>git pull</code>, but not <code>git push</code>, will also
1071 accept a suitable bundle file. See <a href="git-bundle.html">git-bundle(1)</a>.</p>
1072 </div>
1073 <div class="paragraph">
1074 <p>When Git doesn&#8217;t know how to handle a certain transport protocol, it
1075 attempts to use the <code>remote-</code><em>&lt;transport&gt;</em> remote helper, if one
1076 exists. To explicitly request a remote helper, the following syntax
1077 may be used:</p>
1078 </div>
1079 <div class="ulist">
1080 <ul>
1081 <li>
1082 <p><em>&lt;transport&gt;</em>::<em>&lt;address&gt;</em></p>
1083 </li>
1084 </ul>
1085 </div>
1086 <div class="paragraph">
1087 <p>where <em>&lt;address&gt;</em> may be a path, a server and path, or an arbitrary
1088 URL-like string recognized by the specific remote helper being
1089 invoked. See <a href="gitremote-helpers.html">gitremote-helpers(7)</a> for details.</p>
1090 </div>
1091 <div class="paragraph">
1092 <p>If there are a large number of similarly-named remote repositories and
1093 you want to use a different format for them (such that the URLs you
1094 use will be rewritten into URLs that work), you can create a
1095 configuration section of the form:</p>
1096 </div>
1097 <div class="verseblock">
1098 <pre class="content"> [url "<em>&lt;actual-url-base&gt;</em>"]
1099 insteadOf = <em>&lt;other-url-base&gt;</em></pre>
1100 </div>
1101 <div class="paragraph">
1102 <p>For example, with this:</p>
1103 </div>
1104 <div class="listingblock">
1105 <div class="content">
1106 <pre> [url "git://git.host.xz/"]
1107 insteadOf = host.xz:/path/to/
1108 insteadOf = work:</pre>
1109 </div>
1110 </div>
1111 <div class="paragraph">
1112 <p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
1113 rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p>
1114 </div>
1115 <div class="paragraph">
1116 <p>If you want to rewrite URLs for push only, you can create a
1117 configuration section of the form:</p>
1118 </div>
1119 <div class="verseblock">
1120 <pre class="content"> [url "<em>&lt;actual-url-base&gt;</em>"]
1121 pushInsteadOf = <em>&lt;other-url-base&gt;</em></pre>
1122 </div>
1123 <div class="paragraph">
1124 <p>For example, with this:</p>
1125 </div>
1126 <div class="listingblock">
1127 <div class="content">
1128 <pre> [url "ssh://example.org/"]
1129 pushInsteadOf = git://example.org/</pre>
1130 </div>
1131 </div>
1132 <div class="paragraph">
1133 <p>a URL like "git://example.org/path/to/repo.git" will be rewritten to
1134 "ssh://example.org/path/to/repo.git" for pushes, but pulls will still
1135 use the original URL.</p>
1136 </div>
1137 </div>
1138 </div>
1139 <div class="sect1">
1140 <h2 id="_remotes">REMOTES<a id="REMOTES"></a></h2>
1141 <div class="sectionbody">
1142 <div class="paragraph">
1143 <p>The name of one of the following can be used instead
1144 of a URL as <code>&lt;repository&gt;</code> argument:</p>
1145 </div>
1146 <div class="ulist">
1147 <ul>
1148 <li>
1149 <p>a remote in the Git configuration file: <code>$GIT_DIR/config</code>,</p>
1150 </li>
1151 <li>
1152 <p>a file in the <code>$GIT_DIR/remotes</code> directory, or</p>
1153 </li>
1154 <li>
1155 <p>a file in the <code>$GIT_DIR/branches</code> directory.</p>
1156 </li>
1157 </ul>
1158 </div>
1159 <div class="paragraph">
1160 <p>All of these also allow you to omit the refspec from the command line
1161 because they each contain a refspec which git will use by default.</p>
1162 </div>
1163 <div class="sect2">
1164 <h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3>
1165 <div class="paragraph">
1166 <p>You can choose to provide the name of a remote which you had previously
1167 configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a>
1168 or even by a manual edit to the <code>$GIT_DIR/config</code> file. The URL of
1169 this remote will be used to access the repository. The refspec
1170 of this remote will be used by default when you do
1171 not provide a refspec on the command line. The entry in the
1172 config file would appear like this:</p>
1173 </div>
1174 <div class="listingblock">
1175 <div class="content">
1176 <pre> [remote "&lt;name&gt;"]
1177 url = &lt;URL&gt;
1178 pushurl = &lt;pushurl&gt;
1179 push = &lt;refspec&gt;
1180 fetch = &lt;refspec&gt;</pre>
1181 </div>
1182 </div>
1183 <div class="paragraph">
1184 <p>The <code>&lt;pushurl&gt;</code> is used for pushes only. It is optional and defaults
1185 to <code>&lt;URL&gt;</code>. Pushing to a remote affects all defined pushurls or all
1186 defined urls if no pushurls are defined. Fetch, however, will only
1187 fetch from the first defined url if multiple urls are defined.</p>
1188 </div>
1189 </div>
1190 <div class="sect2">
1191 <h3 id="_named_file_in_git_dirremotes">Named file in <code>$GIT_DIR/remotes</code></h3>
1192 <div class="paragraph">
1193 <p>You can choose to provide the name of a
1194 file in <code>$GIT_DIR/remotes</code>. The URL
1195 in this file will be used to access the repository. The refspec
1196 in this file will be used as default when you do not
1197 provide a refspec on the command line. This file should have the
1198 following format:</p>
1199 </div>
1200 <div class="listingblock">
1201 <div class="content">
1202 <pre> URL: one of the above URL formats
1203 Push: &lt;refspec&gt;
1204 Pull: &lt;refspec&gt;</pre>
1205 </div>
1206 </div>
1207 <div class="paragraph">
1208 <p><code>Push:</code> lines are used by <em>git push</em> and
1209 <code>Pull:</code> lines are used by <em>git pull</em> and <em>git fetch</em>.
1210 Multiple <code>Push:</code> and <code>Pull:</code> lines may
1211 be specified for additional branch mappings.</p>
1212 </div>
1213 </div>
1214 <div class="sect2">
1215 <h3 id="_named_file_in_git_dirbranches">Named file in <code>$GIT_DIR/branches</code></h3>
1216 <div class="paragraph">
1217 <p>You can choose to provide the name of a
1218 file in <code>$GIT_DIR/branches</code>.
1219 The URL in this file will be used to access the repository.
1220 This file should have the following format:</p>
1221 </div>
1222 <div class="listingblock">
1223 <div class="content">
1224 <pre> &lt;URL&gt;#&lt;head&gt;</pre>
1225 </div>
1226 </div>
1227 <div class="paragraph">
1228 <p><code>&lt;URL&gt;</code> is required; <code>#&lt;head&gt;</code> is optional.</p>
1229 </div>
1230 <div class="paragraph">
1231 <p>Depending on the operation, git will use one of the following
1232 refspecs, if you don&#8217;t provide one on the command line.
1233 <code>&lt;branch&gt;</code> is the name of this file in <code>$GIT_DIR/branches</code> and
1234 <code>&lt;head&gt;</code> defaults to <code>master</code>.</p>
1235 </div>
1236 <div class="paragraph">
1237 <p>git fetch uses:</p>
1238 </div>
1239 <div class="listingblock">
1240 <div class="content">
1241 <pre> refs/heads/&lt;head&gt;:refs/heads/&lt;branch&gt;</pre>
1242 </div>
1243 </div>
1244 <div class="paragraph">
1245 <p>git push uses:</p>
1246 </div>
1247 <div class="listingblock">
1248 <div class="content">
1249 <pre> HEAD:refs/heads/&lt;head&gt;</pre>
1250 </div>
1251 </div>
1252 </div>
1253 </div>
1254 </div>
1255 <div class="sect1">
1256 <h2 id="_configured_remote_tracking_branches">CONFIGURED REMOTE-TRACKING BRANCHES<a id="CRTB"></a></h2>
1257 <div class="sectionbody">
1258 <div class="paragraph">
1259 <p>You often interact with the same remote repository by
1260 regularly and repeatedly fetching from it. In order to keep track
1261 of the progress of such a remote repository, <code>git fetch</code> allows you
1262 to configure <code>remote.&lt;repository&gt;.fetch</code> configuration variables.</p>
1263 </div>
1264 <div class="paragraph">
1265 <p>Typically such a variable may look like this:</p>
1266 </div>
1267 <div class="listingblock">
1268 <div class="content">
1269 <pre>[remote "origin"]
1270 fetch = +refs/heads/*:refs/remotes/origin/*</pre>
1271 </div>
1272 </div>
1273 <div class="paragraph">
1274 <p>This configuration is used in two ways:</p>
1275 </div>
1276 <div class="ulist">
1277 <ul>
1278 <li>
1279 <p>When <code>git fetch</code> is run without specifying what branches
1280 and/or tags to fetch on the command line, e.g. <code>git fetch origin</code>
1281 or <code>git fetch</code>, <code>remote.&lt;repository&gt;.fetch</code> values are used as
1282 the refspecs&#8212;&#8203;they specify which refs to fetch and which local refs
1283 to update. The example above will fetch
1284 all branches that exist in the <code>origin</code> (i.e. any ref that matches
1285 the left-hand side of the value, <code>refs/heads/*</code>) and update the
1286 corresponding remote-tracking branches in the <code>refs/remotes/origin/*</code>
1287 hierarchy.</p>
1288 </li>
1289 <li>
1290 <p>When <code>git fetch</code> is run with explicit branches and/or tags
1291 to fetch on the command line, e.g. <code>git fetch origin master</code>, the
1292 &lt;refspec&gt;s given on the command line determine what are to be
1293 fetched (e.g. <code>master</code> in the example,
1294 which is a short-hand for <code>master:</code>, which in turn means
1295 "fetch the <em>master</em> branch but I do not explicitly say what
1296 remote-tracking branch to update with it from the command line"),
1297 and the example command will
1298 fetch <em>only</em> the <em>master</em> branch. The <code>remote.&lt;repository&gt;.fetch</code>
1299 values determine which
1300 remote-tracking branch, if any, is updated. When used in this
1301 way, the <code>remote.&lt;repository&gt;.fetch</code> values do not have any
1302 effect in deciding <em>what</em> gets fetched (i.e. the values are not
1303 used as refspecs when the command-line lists refspecs); they are
1304 only used to decide <em>where</em> the refs that are fetched are stored
1305 by acting as a mapping.</p>
1306 </li>
1307 </ul>
1308 </div>
1309 <div class="paragraph">
1310 <p>The latter use of the <code>remote.&lt;repository&gt;.fetch</code> values can be
1311 overridden by giving the <code>--refmap=&lt;refspec&gt;</code> parameter(s) on the
1312 command line.</p>
1313 </div>
1314 </div>
1315 </div>
1316 <div class="sect1">
1317 <h2 id="_pruning">PRUNING</h2>
1318 <div class="sectionbody">
1319 <div class="paragraph">
1320 <p>Git has a default disposition of keeping data unless it&#8217;s explicitly
1321 thrown away; this extends to holding onto local references to branches
1322 on remotes that have themselves deleted those branches.</p>
1323 </div>
1324 <div class="paragraph">
1325 <p>If left to accumulate, these stale references might make performance
1326 worse on big and busy repos that have a lot of branch churn, and
1327 e.g. make the output of commands like <code>git branch -a --contains
1328 &lt;commit&gt;</code> needlessly verbose, as well as impacting anything else
1329 that&#8217;ll work with the complete set of known references.</p>
1330 </div>
1331 <div class="paragraph">
1332 <p>These remote-tracking references can be deleted as a one-off with
1333 either of:</p>
1334 </div>
1335 <div class="listingblock">
1336 <div class="content">
1337 <pre># While fetching
1338 $ git fetch --prune &lt;name&gt;
1340 # Only prune, don't fetch
1341 $ git remote prune &lt;name&gt;</pre>
1342 </div>
1343 </div>
1344 <div class="paragraph">
1345 <p>To prune references as part of your normal workflow without needing to
1346 remember to run that, set <code>fetch.prune</code> globally, or
1347 <code>remote.&lt;name&gt;.prune</code> per-remote in the config. See
1348 <a href="git-config.html">git-config(1)</a>.</p>
1349 </div>
1350 <div class="paragraph">
1351 <p>Here&#8217;s where things get tricky and more specific. The pruning feature
1352 doesn&#8217;t actually care about branches, instead it&#8217;ll prune local &#8592;&#8594;
1353 remote-references as a function of the refspec of the remote (see
1354 <code>&lt;refspec&gt;</code> and <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> above).</p>
1355 </div>
1356 <div class="paragraph">
1357 <p>Therefore if the refspec for the remote includes
1358 e.g. <code>refs/tags/*:refs/tags/*</code>, or you manually run e.g. <code>git fetch
1359 --prune &lt;name&gt; "refs/tags/*:refs/tags/*"</code> it won&#8217;t be stale remote
1360 tracking branches that are deleted, but any local tag that doesn&#8217;t
1361 exist on the remote.</p>
1362 </div>
1363 <div class="paragraph">
1364 <p>This might not be what you expect, i.e. you want to prune remote
1365 <code>&lt;name&gt;</code>, but also explicitly fetch tags from it, so when you fetch
1366 from it you delete all your local tags, most of which may not have
1367 come from the <code>&lt;name&gt;</code> remote in the first place.</p>
1368 </div>
1369 <div class="paragraph">
1370 <p>So be careful when using this with a refspec like
1371 <code>refs/tags/*:refs/tags/*</code>, or any other refspec which might map
1372 references from multiple remotes to the same local namespace.</p>
1373 </div>
1374 <div class="paragraph">
1375 <p>Since keeping up-to-date with both branches and tags on the remote is
1376 a common use-case the <code>--prune-tags</code> option can be supplied along with
1377 <code>--prune</code> to prune local tags that don&#8217;t exist on the remote, and
1378 force-update those tags that differ. Tag pruning can also be enabled
1379 with <code>fetch.pruneTags</code> or <code>remote.&lt;name&gt;.pruneTags</code> in the config. See
1380 <a href="git-config.html">git-config(1)</a>.</p>
1381 </div>
1382 <div class="paragraph">
1383 <p>The <code>--prune-tags</code> option is equivalent to having
1384 <code>refs/tags/*:refs/tags/*</code> declared in the refspecs of the remote. This
1385 can lead to some seemingly strange interactions:</p>
1386 </div>
1387 <div class="listingblock">
1388 <div class="content">
1389 <pre># These both fetch tags
1390 $ git fetch --no-tags origin 'refs/tags/*:refs/tags/*'
1391 $ git fetch --no-tags --prune-tags origin</pre>
1392 </div>
1393 </div>
1394 <div class="paragraph">
1395 <p>The reason it doesn&#8217;t error out when provided without <code>--prune</code> or its
1396 config versions is for flexibility of the configured versions, and to
1397 maintain a 1=1 mapping between what the command line flags do, and
1398 what the configuration versions do.</p>
1399 </div>
1400 <div class="paragraph">
1401 <p>It&#8217;s reasonable to e.g. configure <code>fetch.pruneTags=true</code> in
1402 <code>~/.gitconfig</code> to have tags pruned whenever <code>git fetch --prune</code> is
1403 run, without making every invocation of <code>git fetch</code> without <code>--prune</code>
1404 an error.</p>
1405 </div>
1406 <div class="paragraph">
1407 <p>Pruning tags with <code>--prune-tags</code> also works when fetching a URL
1408 instead of a named remote. These will all prune tags not found on
1409 origin:</p>
1410 </div>
1411 <div class="listingblock">
1412 <div class="content">
1413 <pre>$ git fetch origin --prune --prune-tags
1414 $ git fetch origin --prune 'refs/tags/*:refs/tags/*'
1415 $ git fetch &lt;url-of-origin&gt; --prune --prune-tags
1416 $ git fetch &lt;url-of-origin&gt; --prune 'refs/tags/*:refs/tags/*'</pre>
1417 </div>
1418 </div>
1419 </div>
1420 </div>
1421 <div class="sect1">
1422 <h2 id="_output">OUTPUT</h2>
1423 <div class="sectionbody">
1424 <div class="paragraph">
1425 <p>The output of "git fetch" depends on the transport method used; this
1426 section describes the output when fetching over the Git protocol
1427 (either locally or via ssh) and Smart HTTP protocol.</p>
1428 </div>
1429 <div class="paragraph">
1430 <p>The status of the fetch is output in tabular form, with each line
1431 representing the status of a single ref. Each line is of the form:</p>
1432 </div>
1433 <div class="listingblock">
1434 <div class="content">
1435 <pre> &lt;flag&gt; &lt;summary&gt; &lt;from&gt; -&gt; &lt;to&gt; [&lt;reason&gt;]</pre>
1436 </div>
1437 </div>
1438 <div class="paragraph">
1439 <p>When using <code>--porcelain</code>, the output format is intended to be
1440 machine-parseable. In contrast to the human-readable output formats it
1441 thus prints to standard output instead of standard error. Each line is
1442 of the form:</p>
1443 </div>
1444 <div class="listingblock">
1445 <div class="content">
1446 <pre>&lt;flag&gt; &lt;old-object-id&gt; &lt;new-object-id&gt; &lt;local-reference&gt;</pre>
1447 </div>
1448 </div>
1449 <div class="paragraph">
1450 <p>The status of up-to-date refs is shown only if the --verbose option is
1451 used.</p>
1452 </div>
1453 <div class="paragraph">
1454 <p>In compact output mode, specified with configuration variable
1455 fetch.output, if either entire <code>&lt;from&gt;</code> or <code>&lt;to&gt;</code> is found in the
1456 other string, it will be substituted with <code>*</code> in the other string. For
1457 example, <code>master -&gt; origin/master</code> becomes <code>master -&gt; origin/*</code>.</p>
1458 </div>
1459 <div class="dlist">
1460 <dl>
1461 <dt class="hdlist1">flag</dt>
1462 <dd>
1463 <p>A single character indicating the status of the ref:</p>
1464 <div class="dlist">
1465 <dl>
1466 <dt class="hdlist1">(space)</dt>
1467 <dd>
1468 <p>for a successfully fetched fast-forward;</p>
1469 </dd>
1470 <dt class="hdlist1"><code>+</code></dt>
1471 <dd>
1472 <p>for a successful forced update;</p>
1473 </dd>
1474 <dt class="hdlist1"><code>-</code></dt>
1475 <dd>
1476 <p>for a successfully pruned ref;</p>
1477 </dd>
1478 <dt class="hdlist1"><code>t</code></dt>
1479 <dd>
1480 <p>for a successful tag update;</p>
1481 </dd>
1482 <dt class="hdlist1"><code>*</code></dt>
1483 <dd>
1484 <p>for a successfully fetched new ref;</p>
1485 </dd>
1486 <dt class="hdlist1"><code>!</code></dt>
1487 <dd>
1488 <p>for a ref that was rejected or failed to update; and</p>
1489 </dd>
1490 <dt class="hdlist1"><code>=</code></dt>
1491 <dd>
1492 <p>for a ref that was up to date and did not need fetching.</p>
1493 </dd>
1494 </dl>
1495 </div>
1496 </dd>
1497 <dt class="hdlist1">summary</dt>
1498 <dd>
1499 <p>For a successfully fetched ref, the summary shows the old and new
1500 values of the ref in a form suitable for using as an argument to
1501 <code>git log</code> (this is <code>&lt;old&gt;..&lt;new&gt;</code> in most cases, and
1502 <code>&lt;old&gt;...&lt;new&gt;</code> for forced non-fast-forward updates).</p>
1503 </dd>
1504 <dt class="hdlist1">from</dt>
1505 <dd>
1506 <p>The name of the remote ref being fetched from, minus its
1507 <code>refs/&lt;type&gt;/</code> prefix. In the case of deletion, the name of
1508 the remote ref is "(none)".</p>
1509 </dd>
1510 <dt class="hdlist1">to</dt>
1511 <dd>
1512 <p>The name of the local ref being updated, minus its
1513 <code>refs/&lt;type&gt;/</code> prefix.</p>
1514 </dd>
1515 <dt class="hdlist1">reason</dt>
1516 <dd>
1517 <p>A human-readable explanation. In the case of successfully fetched
1518 refs, no explanation is needed. For a failed ref, the reason for
1519 failure is described.</p>
1520 </dd>
1521 </dl>
1522 </div>
1523 </div>
1524 </div>
1525 <div class="sect1">
1526 <h2 id="_examples">EXAMPLES</h2>
1527 <div class="sectionbody">
1528 <div class="ulist">
1529 <ul>
1530 <li>
1531 <p>Update the remote-tracking branches:</p>
1532 <div class="listingblock">
1533 <div class="content">
1534 <pre>$ git fetch origin</pre>
1535 </div>
1536 </div>
1537 <div class="paragraph">
1538 <p>The above command copies all branches from the remote <code>refs/heads/</code>
1539 namespace and stores them to the local <code>refs/remotes/origin/</code> namespace,
1540 unless the <code>remote.&lt;repository&gt;.fetch</code> option is used to specify a
1541 non-default refspec.</p>
1542 </div>
1543 </li>
1544 <li>
1545 <p>Using refspecs explicitly:</p>
1546 <div class="listingblock">
1547 <div class="content">
1548 <pre>$ git fetch origin +seen:seen maint:tmp</pre>
1549 </div>
1550 </div>
1551 <div class="paragraph">
1552 <p>This updates (or creates, as necessary) branches <code>seen</code> and <code>tmp</code> in
1553 the local repository by fetching from the branches (respectively)
1554 <code>seen</code> and <code>maint</code> from the remote repository.</p>
1555 </div>
1556 <div class="paragraph">
1557 <p>The <code>seen</code> branch will be updated even if it does not fast-forward,
1558 because it is prefixed with a plus sign; <code>tmp</code> will not be.</p>
1559 </div>
1560 </li>
1561 <li>
1562 <p>Peek at a remote&#8217;s branch, without configuring the remote in your local
1563 repository:</p>
1564 <div class="listingblock">
1565 <div class="content">
1566 <pre>$ git fetch git://git.kernel.org/pub/scm/git/git.git maint
1567 $ git log FETCH_HEAD</pre>
1568 </div>
1569 </div>
1570 <div class="paragraph">
1571 <p>The first command fetches the <code>maint</code> branch from the repository at
1572 <code>git://git.kernel.org/pub/scm/git/git.git</code> and the second command uses
1573 <code>FETCH_HEAD</code> to examine the branch with <a href="git-log.html">git-log(1)</a>. The fetched
1574 objects will eventually be removed by git&#8217;s built-in housekeeping (see
1575 <a href="git-gc.html">git-gc(1)</a>).</p>
1576 </div>
1577 </li>
1578 </ul>
1579 </div>
1580 </div>
1581 </div>
1582 <div class="sect1">
1583 <h2 id="_security">SECURITY</h2>
1584 <div class="sectionbody">
1585 <div class="paragraph">
1586 <p>The fetch and push protocols are not designed to prevent one side from
1587 stealing data from the other repository that was not intended to be
1588 shared. If you have private data that you need to protect from a malicious
1589 peer, your best option is to store it in another repository. This applies
1590 to both clients and servers. In particular, namespaces on a server are not
1591 effective for read access control; you should only grant read access to a
1592 namespace to clients that you would trust with read access to the entire
1593 repository.</p>
1594 </div>
1595 <div class="paragraph">
1596 <p>The known attack vectors are as follows:</p>
1597 </div>
1598 <div class="olist arabic">
1599 <ol class="arabic">
1600 <li>
1601 <p>The victim sends "have" lines advertising the IDs of objects it has that
1602 are not explicitly intended to be shared but can be used to optimize the
1603 transfer if the peer also has them. The attacker chooses an object ID X
1604 to steal and sends a ref to X, but isn&#8217;t required to send the content of
1605 X because the victim already has it. Now the victim believes that the
1606 attacker has X, and it sends the content of X back to the attacker
1607 later. (This attack is most straightforward for a client to perform on a
1608 server, by creating a ref to X in the namespace the client has access
1609 to and then fetching it. The most likely way for a server to perform it
1610 on a client is to "merge" X into a public branch and hope that the user
1611 does additional work on this branch and pushes it back to the server
1612 without noticing the merge.)</p>
1613 </li>
1614 <li>
1615 <p>As in #1, the attacker chooses an object ID X to steal. The victim sends
1616 an object Y that the attacker already has, and the attacker falsely
1617 claims to have X and not Y, so the victim sends Y as a delta against X.
1618 The delta reveals regions of X that are similar to Y to the attacker.</p>
1619 </li>
1620 </ol>
1621 </div>
1622 </div>
1623 </div>
1624 <div class="sect1">
1625 <h2 id="_configuration">CONFIGURATION</h2>
1626 <div class="sectionbody">
1627 <div class="paragraph">
1628 <p>Everything below this line in this section is selectively included
1629 from the <a href="git-config.html">git-config(1)</a> documentation. The content is the same
1630 as what&#8217;s found there:</p>
1631 </div>
1632 <div class="dlist">
1633 <dl>
1634 <dt class="hdlist1">fetch.recurseSubmodules</dt>
1635 <dd>
1636 <p>This option controls whether <code>git fetch</code> (and the underlying fetch
1637 in <code>git pull</code>) will recursively fetch into populated submodules.
1638 This option can be set either to a boolean value or to <em>on-demand</em>.
1639 Setting it to a boolean changes the behavior of fetch and pull to
1640 recurse unconditionally into submodules when set to true or to not
1641 recurse at all when set to false. When set to <em>on-demand</em>, fetch and
1642 pull will only recurse into a populated submodule when its
1643 superproject retrieves a commit that updates the submodule&#8217;s
1644 reference.
1645 Defaults to <em>on-demand</em>, or to the value of <em>submodule.recurse</em> if set.</p>
1646 </dd>
1647 <dt class="hdlist1">fetch.fsckObjects</dt>
1648 <dd>
1649 <p>If it is set to true, git-fetch-pack will check all fetched
1650 objects. See <code>transfer.fsckObjects</code> for what&#8217;s
1651 checked. Defaults to false. If not set, the value of
1652 <code>transfer.fsckObjects</code> is used instead.</p>
1653 </dd>
1654 <dt class="hdlist1">fetch.fsck.&lt;msg-id&gt;</dt>
1655 <dd>
1656 <p>Acts like <code>fsck.&lt;msg-id&gt;</code>, but is used by
1657 <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See
1658 the <code>fsck.&lt;msg-id&gt;</code> documentation for details.</p>
1659 </dd>
1660 <dt class="hdlist1">fetch.fsck.skipList</dt>
1661 <dd>
1662 <p>Acts like <code>fsck.skipList</code>, but is used by
1663 <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See
1664 the <code>fsck.skipList</code> documentation for details.</p>
1665 </dd>
1666 <dt class="hdlist1">fetch.unpackLimit</dt>
1667 <dd>
1668 <p>If the number of objects fetched over the Git native
1669 transfer is below this
1670 limit, then the objects will be unpacked into loose object
1671 files. However if the number of received objects equals or
1672 exceeds this limit then the received pack will be stored as
1673 a pack, after adding any missing delta bases. Storing the
1674 pack from a push can make the push operation complete faster,
1675 especially on slow filesystems. If not set, the value of
1676 <code>transfer.unpackLimit</code> is used instead.</p>
1677 </dd>
1678 <dt class="hdlist1">fetch.prune</dt>
1679 <dd>
1680 <p>If true, fetch will automatically behave as if the <code>--prune</code>
1681 option was given on the command line. See also <code>remote.&lt;name&gt;.prune</code>
1682 and the PRUNING section of <a href="git-fetch.html">git-fetch(1)</a>.</p>
1683 </dd>
1684 <dt class="hdlist1">fetch.pruneTags</dt>
1685 <dd>
1686 <p>If true, fetch will automatically behave as if the
1687 <code>refs/tags/*:refs/tags/*</code> refspec was provided when pruning,
1688 if not set already. This allows for setting both this option
1689 and <code>fetch.prune</code> to maintain a 1=1 mapping to upstream
1690 refs. See also <code>remote.&lt;name&gt;.pruneTags</code> and the PRUNING
1691 section of <a href="git-fetch.html">git-fetch(1)</a>.</p>
1692 </dd>
1693 <dt class="hdlist1">fetch.all</dt>
1694 <dd>
1695 <p>If true, fetch will attempt to update all available remotes.
1696 This behavior can be overridden by passing <code>--no-all</code> or by
1697 explicitly specifying one or more remote(s) to fetch from.
1698 Defaults to false.</p>
1699 </dd>
1700 <dt class="hdlist1">fetch.output</dt>
1701 <dd>
1702 <p>Control how ref update status is printed. Valid values are
1703 <code>full</code> and <code>compact</code>. Default value is <code>full</code>. See the
1704 OUTPUT section in <a href="git-fetch.html">git-fetch(1)</a> for details.</p>
1705 </dd>
1706 <dt class="hdlist1">fetch.negotiationAlgorithm</dt>
1707 <dd>
1708 <p>Control how information about the commits in the local repository
1709 is sent when negotiating the contents of the packfile to be sent by
1710 the server. Set to "consecutive" to use an algorithm that walks
1711 over consecutive commits checking each one. Set to "skipping" to
1712 use an algorithm that skips commits in an effort to converge
1713 faster, but may result in a larger-than-necessary packfile; or set
1714 to "noop" to not send any information at all, which will almost
1715 certainly result in a larger-than-necessary packfile, but will skip
1716 the negotiation step. Set to "default" to override settings made
1717 previously and use the default behaviour. The default is normally
1718 "consecutive", but if <code>feature.experimental</code> is true, then the
1719 default is "skipping". Unknown values will cause <em>git fetch</em> to
1720 error out.</p>
1721 <div class="paragraph">
1722 <p>See also the <code>--negotiate-only</code> and <code>--negotiation-tip</code> options to
1723 <a href="git-fetch.html">git-fetch(1)</a>.</p>
1724 </div>
1725 </dd>
1726 <dt class="hdlist1">fetch.showForcedUpdates</dt>
1727 <dd>
1728 <p>Set to false to enable <code>--no-show-forced-updates</code> in
1729 <a href="git-fetch.html">git-fetch(1)</a> and <a href="git-pull.html">git-pull(1)</a> commands.
1730 Defaults to true.</p>
1731 </dd>
1732 <dt class="hdlist1">fetch.parallel</dt>
1733 <dd>
1734 <p>Specifies the maximal number of fetch operations to be run in parallel
1735 at a time (submodules, or remotes when the <code>--multiple</code> option of
1736 <a href="git-fetch.html">git-fetch(1)</a> is in effect).</p>
1737 <div class="paragraph">
1738 <p>A value of 0 will give some reasonable default. If unset, it defaults to 1.</p>
1739 </div>
1740 <div class="paragraph">
1741 <p>For submodules, this setting can be overridden using the <code>submodule.fetchJobs</code>
1742 config setting.</p>
1743 </div>
1744 </dd>
1745 <dt class="hdlist1">fetch.writeCommitGraph</dt>
1746 <dd>
1747 <p>Set to true to write a commit-graph after every <code>git fetch</code> command
1748 that downloads a pack-file from a remote. Using the <code>--split</code> option,
1749 most executions will create a very small commit-graph file on top of
1750 the existing commit-graph file(s). Occasionally, these files will
1751 merge and the write may take longer. Having an updated commit-graph
1752 file helps performance of many Git commands, including <code>git merge-base</code>,
1753 <code>git push -f</code>, and <code>git log --graph</code>. Defaults to false.</p>
1754 </dd>
1755 <dt class="hdlist1">fetch.bundleURI</dt>
1756 <dd>
1757 <p>This value stores a URI for downloading Git object data from a bundle
1758 URI before performing an incremental fetch from the origin Git server.
1759 This is similar to how the <code>--bundle-uri</code> option behaves in
1760 <a href="git-clone.html">git-clone(1)</a>. <code>git clone --bundle-uri</code> will set the
1761 <code>fetch.bundleURI</code> value if the supplied bundle URI contains a bundle
1762 list that is organized for incremental fetches.</p>
1763 <div class="paragraph">
1764 <p>If you modify this value and your repository has a <code>fetch.bundleCreationToken</code>
1765 value, then remove that <code>fetch.bundleCreationToken</code> value before fetching from
1766 the new bundle URI.</p>
1767 </div>
1768 </dd>
1769 <dt class="hdlist1">fetch.bundleCreationToken</dt>
1770 <dd>
1771 <p>When using <code>fetch.bundleURI</code> to fetch incrementally from a bundle
1772 list that uses the "creationToken" heuristic, this config value
1773 stores the maximum <code>creationToken</code> value of the downloaded bundles.
1774 This value is used to prevent downloading bundles in the future
1775 if the advertised <code>creationToken</code> is not strictly larger than this
1776 value.</p>
1777 <div class="paragraph">
1778 <p>The creation token values are chosen by the provider serving the specific
1779 bundle URI. If you modify the URI at <code>fetch.bundleURI</code>, then be sure to
1780 remove the value for the <code>fetch.bundleCreationToken</code> value before fetching.</p>
1781 </div>
1782 </dd>
1783 </dl>
1784 </div>
1785 </div>
1786 </div>
1787 <div class="sect1">
1788 <h2 id="_bugs">BUGS</h2>
1789 <div class="sectionbody">
1790 <div class="paragraph">
1791 <p>Using --recurse-submodules can only fetch new commits in submodules that are
1792 present locally e.g. in <code>$GIT_DIR/modules/</code>. If the upstream adds a new
1793 submodule, that submodule cannot be fetched until it is cloned e.g. by <code>git
1794 submodule update</code>. This is expected to be fixed in a future Git version.</p>
1795 </div>
1796 </div>
1797 </div>
1798 <div class="sect1">
1799 <h2 id="_see_also">SEE ALSO</h2>
1800 <div class="sectionbody">
1801 <div class="paragraph">
1802 <p><a href="git-pull.html">git-pull(1)</a></p>
1803 </div>
1804 </div>
1805 </div>
1806 <div class="sect1">
1807 <h2 id="_git">GIT</h2>
1808 <div class="sectionbody">
1809 <div class="paragraph">
1810 <p>Part of the <a href="git.html">git(1)</a> suite</p>
1811 </div>
1812 </div>
1813 </div>
1814 </div>
1815 <div id="footer">
1816 <div id="footer-text">
1817 Last updated 2024-02-08 15:45:59 -0800
1818 </div>
1819 </div>
1820 </body>
1821 </html>