Autogenerated HTML docs for v2.47.0-72-gef8ce8
[git-htmldocs.git] / git-fetch.html
blobce6a16c10fd099c7f4f6a69505c95182d5ba3bbd
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, except for the ones that has the
504 <code>remote.</code><em>&lt;name&gt;</em><code>.skipFetchAll</code> configuration variable set.
505 This overrides the configuration variable fetch.all`.</p>
506 </dd>
507 <dt class="hdlist1">-a</dt>
508 <dt class="hdlist1">--append</dt>
509 <dd>
510 <p>Append ref names and object names of fetched refs to the
511 existing contents of .<code>git/FETCH_HEAD</code>. Without this
512 option old data in .<code>git/FETCH_HEAD</code> will be overwritten.</p>
513 </dd>
514 <dt class="hdlist1">--atomic</dt>
515 <dd>
516 <p>Use an atomic transaction to update local refs. Either all refs are
517 updated, or on error, no refs are updated.</p>
518 </dd>
519 <dt class="hdlist1">--depth=&lt;depth&gt;</dt>
520 <dd>
521 <p>Limit fetching to the specified number of commits from the tip of
522 each remote branch history. If fetching to a <em>shallow</em> repository
523 created by <code>git</code> <code>clone</code> with <code>--depth=</code><em>&lt;depth&gt;</em> option (see
524 <a href="git-clone.html">git-clone(1)</a>), deepen or shorten the history to the specified
525 number of commits. Tags for the deepened commits are not fetched.</p>
526 </dd>
527 <dt class="hdlist1">--deepen=&lt;depth&gt;</dt>
528 <dd>
529 <p>Similar to --depth, except it specifies the number of commits
530 from the current shallow boundary instead of from the tip of
531 each remote branch history.</p>
532 </dd>
533 <dt class="hdlist1">--shallow-since=&lt;date&gt;</dt>
534 <dd>
535 <p>Deepen or shorten the history of a shallow repository to
536 include all reachable commits after &lt;date&gt;.</p>
537 </dd>
538 <dt class="hdlist1">--shallow-exclude=&lt;revision&gt;</dt>
539 <dd>
540 <p>Deepen or shorten the history of a shallow repository to
541 exclude commits reachable from a specified remote branch or tag.
542 This option can be specified multiple times.</p>
543 </dd>
544 <dt class="hdlist1">--unshallow</dt>
545 <dd>
546 <p>If the source repository is complete, convert a shallow
547 repository to a complete one, removing all the limitations
548 imposed by shallow repositories.</p>
549 <div class="paragraph">
550 <p>If the source repository is shallow, fetch as much as possible so that
551 the current repository has the same history as the source repository.</p>
552 </div>
553 </dd>
554 <dt class="hdlist1">--update-shallow</dt>
555 <dd>
556 <p>By default when fetching from a shallow repository,
557 <code>git</code> <code>fetch</code> refuses refs that require updating
558 .git/shallow. This option updates .git/shallow and accepts such
559 refs.</p>
560 </dd>
561 <dt class="hdlist1">--negotiation-tip=&lt;commit|glob&gt;</dt>
562 <dd>
563 <p>By default, Git will report, to the server, commits reachable
564 from all local refs to find common commits in an attempt to
565 reduce the size of the to-be-received packfile. If specified,
566 Git will only report commits reachable from the given tips.
567 This is useful to speed up fetches when the user knows which
568 local ref is likely to have commits in common with the
569 upstream ref being fetched.</p>
570 <div class="paragraph">
571 <p>This option may be specified more than once; if so, Git will report
572 commits reachable from any of the given commits.</p>
573 </div>
574 <div class="paragraph">
575 <p>The argument to this option may be a glob on ref names, a ref, or the (possibly
576 abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying
577 this option multiple times, one for each matching ref name.</p>
578 </div>
579 <div class="paragraph">
580 <p>See also the <code>fetch.negotiationAlgorithm</code> and <code>push.negotiate</code>
581 configuration variables documented in <a href="git-config.html">git-config(1)</a>, and the
582 <code>--negotiate-only</code> option below.</p>
583 </div>
584 </dd>
585 <dt class="hdlist1">--negotiate-only</dt>
586 <dd>
587 <p>Do not fetch anything from the server, and instead print the
588 ancestors of the provided <code>--negotiation-tip=</code>* arguments,
589 which we have in common with the server.</p>
590 <div class="paragraph">
591 <p>This is incompatible with <code>--recurse-submodules=</code>[<code>yes</code>|<code>on-demand</code>].
592 Internally this is used to implement the <code>push.negotiate</code> option, see
593 <a href="git-config.html">git-config(1)</a>.</p>
594 </div>
595 </dd>
596 <dt class="hdlist1">--dry-run</dt>
597 <dd>
598 <p>Show what would be done, without making any changes.</p>
599 </dd>
600 <dt class="hdlist1">--porcelain</dt>
601 <dd>
602 <p>Print the output to standard output in an easy-to-parse format for
603 scripts. See section OUTPUT in <a href="git-fetch.html">git-fetch(1)</a> for details.</p>
604 <div class="paragraph">
605 <p>This is incompatible with <code>--recurse-submodules=</code>[<code>yes</code>|<code>on-demand</code>] and takes
606 precedence over the <code>fetch.output</code> config option.</p>
607 </div>
608 </dd>
609 <dt class="hdlist1">--[no-]write-fetch-head</dt>
610 <dd>
611 <p>Write the list of remote refs fetched in the <code>FETCH_HEAD</code>
612 file directly under <code>$GIT_DIR</code>. This is the default.
613 Passing <code>--no-write-fetch-head</code> from the command line tells
614 Git not to write the file. Under <code>--dry-run</code> option, the
615 file is never written.</p>
616 </dd>
617 <dt class="hdlist1">-f</dt>
618 <dt class="hdlist1">--force</dt>
619 <dd>
620 <p>When <em>git fetch</em> is used with <em>&lt;src&gt;</em><code>:</code><em>&lt;dst&gt;</em> refspec, it may
621 refuse to update the local branch as discussed
622 in the <em>&lt;refspec&gt;</em> part below.
623 This option overrides that check.</p>
624 </dd>
625 <dt class="hdlist1">-k</dt>
626 <dt class="hdlist1">--keep</dt>
627 <dd>
628 <p>Keep downloaded pack.</p>
629 </dd>
630 <dt class="hdlist1">--multiple</dt>
631 <dd>
632 <p>Allow several &lt;repository&gt; and &lt;group&gt; arguments to be
633 specified. No &lt;refspec&gt;s may be specified.</p>
634 </dd>
635 <dt class="hdlist1">--[no-]auto-maintenance</dt>
636 <dt class="hdlist1">--[no-]auto-gc</dt>
637 <dd>
638 <p>Run <code>git</code> <code>maintenance</code> <code>run</code> <code>--auto</code> at the end to perform automatic
639 repository maintenance if needed. (<code>--</code>[<code>no-</code>]<code>auto-gc</code> is a synonym.)
640 This is enabled by default.</p>
641 </dd>
642 <dt class="hdlist1">--[no-]write-commit-graph</dt>
643 <dd>
644 <p>Write a commit-graph after fetching. This overrides the config
645 setting <code>fetch.writeCommitGraph</code>.</p>
646 </dd>
647 <dt class="hdlist1">--prefetch</dt>
648 <dd>
649 <p>Modify the configured refspec to place all refs into the
650 <code>refs/prefetch/</code> namespace. See the <code>prefetch</code> task in
651 <a href="git-maintenance.html">git-maintenance(1)</a>.</p>
652 </dd>
653 <dt class="hdlist1">-p</dt>
654 <dt class="hdlist1">--prune</dt>
655 <dd>
656 <p>Before fetching, remove any remote-tracking references that no
657 longer exist on the remote. Tags are not subject to pruning
658 if they are fetched only because of the default tag
659 auto-following or due to a --tags option. However, if tags
660 are fetched due to an explicit refspec (either on the command
661 line or in the remote configuration, for example if the remote
662 was cloned with the --mirror option), then they are also
663 subject to pruning. Supplying <code>--prune-tags</code> is a shorthand for
664 providing the tag refspec.</p>
665 <div class="paragraph">
666 <p>See the PRUNING section below for more details.</p>
667 </div>
668 </dd>
669 <dt class="hdlist1">-P</dt>
670 <dt class="hdlist1">--prune-tags</dt>
671 <dd>
672 <p>Before fetching, remove any local tags that no longer exist on
673 the remote if <code>--prune</code> is enabled. This option should be used
674 more carefully, unlike <code>--prune</code> it will remove any local
675 references (local tags) that have been created. This option is
676 a shorthand for providing the explicit tag refspec along with
677 <code>--prune</code>, see the discussion about that in its documentation.</p>
678 <div class="paragraph">
679 <p>See the PRUNING section below for more details.</p>
680 </div>
681 </dd>
682 <dt class="hdlist1">-n</dt>
683 <dt class="hdlist1">--no-tags</dt>
684 <dd>
685 <p>By default, tags that point at objects that are downloaded
686 from the remote repository are fetched and stored locally.
687 This option disables this automatic tag following. The default
688 behavior for a remote may be specified with the remote.&lt;name&gt;.tagOpt
689 setting. See <a href="git-config.html">git-config(1)</a>.</p>
690 </dd>
691 <dt class="hdlist1">--refetch</dt>
692 <dd>
693 <p>Instead of negotiating with the server to avoid transferring commits and
694 associated objects that are already present locally, this option fetches
695 all objects as a fresh clone would. Use this to reapply a partial clone
696 filter from configuration or using <code>--filter=</code> when the filter
697 definition has changed. Automatic post-fetch maintenance will perform
698 object database pack consolidation to remove any duplicate objects.</p>
699 </dd>
700 <dt class="hdlist1">--refmap=&lt;refspec&gt;</dt>
701 <dd>
702 <p>When fetching refs listed on the command line, use the
703 specified refspec (can be given more than once) to map the
704 refs to remote-tracking branches, instead of the values of
705 <code>remote.</code>*.<code>fetch</code> configuration variables for the remote
706 repository. Providing an empty <em>&lt;refspec&gt;</em> to the
707 <code>--refmap</code> option causes Git to ignore the configured
708 refspecs and rely entirely on the refspecs supplied as
709 command-line arguments. See section on "Configured Remote-tracking
710 Branches" for details.</p>
711 </dd>
712 <dt class="hdlist1">-t</dt>
713 <dt class="hdlist1">--tags</dt>
714 <dd>
715 <p>Fetch all tags from the remote (i.e., fetch remote tags
716 <code>refs/tags/</code>* into local tags with the same name), in addition
717 to whatever else would otherwise be fetched. Using this
718 option alone does not subject tags to pruning, even if --prune
719 is used (though tags may be pruned anyway if they are also the
720 destination of an explicit refspec; see <code>--prune</code>).</p>
721 </dd>
722 <dt class="hdlist1">--recurse-submodules[=(yes|on-demand|no)]</dt>
723 <dd>
724 <p>This option controls if and under what conditions new commits of
725 submodules should be fetched too. When recursing through submodules,
726 <code>git</code> <code>fetch</code> always attempts to fetch "changed" submodules, that is, a
727 submodule that has commits that are referenced by a newly fetched
728 superproject commit but are missing in the local submodule clone. A
729 changed submodule can be fetched as long as it is present locally e.g.
730 in <code>$GIT_DIR/modules/</code> (see <a href="gitsubmodules.html">gitsubmodules(7)</a>); if the upstream
731 adds a new submodule, that submodule cannot be fetched until it is
732 cloned e.g. by <code>git</code> <code>submodule</code> <code>update</code>.</p>
733 <div class="paragraph">
734 <p>When set to <em>on-demand</em>, only changed submodules are fetched. When set
735 to <em>yes</em>, all populated submodules are fetched and submodules that are
736 both unpopulated and changed are fetched. When set to <em>no</em>, submodules
737 are never fetched.</p>
738 </div>
739 <div class="paragraph">
740 <p>When unspecified, this uses the value of <code>fetch.recurseSubmodules</code> if it
741 is set (see <a href="git-config.html">git-config(1)</a>), defaulting to <em>on-demand</em> if unset.
742 When this option is used without any value, it defaults to <em>yes</em>.</p>
743 </div>
744 </dd>
745 <dt class="hdlist1">-j</dt>
746 <dt class="hdlist1">--jobs=&lt;n&gt;</dt>
747 <dd>
748 <p>Number of parallel children to be used for all forms of fetching.</p>
749 <div class="paragraph">
750 <p>If the <code>--multiple</code> option was specified, the different remotes will be fetched
751 in parallel. If multiple submodules are fetched, they will be fetched in
752 parallel. To control them independently, use the config settings
753 <code>fetch.parallel</code> and <code>submodule.fetchJobs</code> (see <a href="git-config.html">git-config(1)</a>).</p>
754 </div>
755 <div class="paragraph">
756 <p>Typically, parallel recursive and multi-remote fetches will be faster. By
757 default fetches are performed sequentially, not in parallel.</p>
758 </div>
759 </dd>
760 <dt class="hdlist1">--no-recurse-submodules</dt>
761 <dd>
762 <p>Disable recursive fetching of submodules (this has the same effect as
763 using the <code>--recurse-submodules=no</code> option).</p>
764 </dd>
765 <dt class="hdlist1">--set-upstream</dt>
766 <dd>
767 <p>If the remote is fetched successfully, add upstream
768 (tracking) reference, used by argument-less
769 <a href="git-pull.html">git-pull(1)</a> and other commands. For more information,
770 see <code>branch.</code><em>&lt;name&gt;</em><code>.merge</code> and <code>branch.</code><em>&lt;name&gt;</em><code>.remote</code> in
771 <a href="git-config.html">git-config(1)</a>.</p>
772 </dd>
773 <dt class="hdlist1">--submodule-prefix=&lt;path&gt;</dt>
774 <dd>
775 <p>Prepend &lt;path&gt; to paths printed in informative messages
776 such as "Fetching submodule foo". This option is used
777 internally when recursing over submodules.</p>
778 </dd>
779 <dt class="hdlist1">--recurse-submodules-default=[yes|on-demand]</dt>
780 <dd>
781 <p>This option is used internally to temporarily provide a
782 non-negative default value for the --recurse-submodules
783 option. All other methods of configuring fetch&#8217;s submodule
784 recursion (such as settings in <a href="gitmodules.html">gitmodules(5)</a> and
785 <a href="git-config.html">git-config(1)</a>) override this option, as does
786 specifying --[no-]recurse-submodules directly.</p>
787 </dd>
788 <dt class="hdlist1">-u</dt>
789 <dt class="hdlist1">--update-head-ok</dt>
790 <dd>
791 <p>By default <em>git fetch</em> refuses to update the head which
792 corresponds to the current branch. This flag disables the
793 check. This is purely for the internal use for <em>git pull</em>
794 to communicate with <em>git fetch</em>, and unless you are
795 implementing your own Porcelain you are not supposed to
796 use it.</p>
797 </dd>
798 <dt class="hdlist1">--upload-pack &lt;upload-pack&gt;</dt>
799 <dd>
800 <p>When given, and the repository to fetch from is handled
801 by <em>git fetch-pack</em>, <code>--exec=</code><em>&lt;upload-pack&gt;</em> is passed to
802 the command to specify non-default path for the command
803 run on the other end.</p>
804 </dd>
805 <dt class="hdlist1">-q</dt>
806 <dt class="hdlist1">--quiet</dt>
807 <dd>
808 <p>Pass --quiet to git-fetch-pack and silence any other internally
809 used git commands. Progress is not reported to the standard error
810 stream.</p>
811 </dd>
812 <dt class="hdlist1">-v</dt>
813 <dt class="hdlist1">--verbose</dt>
814 <dd>
815 <p>Be verbose.</p>
816 </dd>
817 <dt class="hdlist1">--progress</dt>
818 <dd>
819 <p>Progress status is reported on the standard error stream
820 by default when it is attached to a terminal, unless -q
821 is specified. This flag forces progress status even if the
822 standard error stream is not directed to a terminal.</p>
823 </dd>
824 <dt class="hdlist1">-o &lt;option&gt;</dt>
825 <dt class="hdlist1">--server-option=&lt;option&gt;</dt>
826 <dd>
827 <p>Transmit the given string to the server when communicating using
828 protocol version 2. The given string must not contain a NUL or LF
829 character. The server&#8217;s handling of server options, including
830 unknown ones, is server-specific.
831 When multiple <code>--server-option=</code><em>&lt;option&gt;</em> are given, they are all
832 sent to the other side in the order listed on the command line.</p>
833 </dd>
834 <dt class="hdlist1">--show-forced-updates</dt>
835 <dd>
836 <p>By default, git checks if a branch is force-updated during
837 fetch. This can be disabled through fetch.showForcedUpdates, but
838 the --show-forced-updates option guarantees this check occurs.
839 See <a href="git-config.html">git-config(1)</a>.</p>
840 </dd>
841 <dt class="hdlist1">--no-show-forced-updates</dt>
842 <dd>
843 <p>By default, git checks if a branch is force-updated during
844 fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates
845 to false to skip this check for performance reasons. If used during
846 <em>git-pull</em> the --ff-only option will still check for forced updates
847 before attempting a fast-forward update. See <a href="git-config.html">git-config(1)</a>.</p>
848 </dd>
849 <dt class="hdlist1">-4</dt>
850 <dt class="hdlist1">--ipv4</dt>
851 <dd>
852 <p>Use IPv4 addresses only, ignoring IPv6 addresses.</p>
853 </dd>
854 <dt class="hdlist1">-6</dt>
855 <dt class="hdlist1">--ipv6</dt>
856 <dd>
857 <p>Use IPv6 addresses only, ignoring IPv4 addresses.</p>
858 </dd>
859 <dt class="hdlist1">&lt;repository&gt;</dt>
860 <dd>
861 <p>The "remote" repository that is the source of a fetch
862 or pull operation. This parameter can be either a URL
863 (see the section <a href="#URLS">GIT URLS</a> below) or the name
864 of a remote (see the section <a href="#REMOTES">REMOTES</a> below).</p>
865 </dd>
866 <dt class="hdlist1">&lt;group&gt;</dt>
867 <dd>
868 <p>A name referring to a list of repositories as the value
869 of remotes.&lt;group&gt; in the configuration file.
870 (See <a href="git-config.html">git-config(1)</a>).</p>
871 </dd>
872 <dt class="hdlist1">&lt;refspec&gt;</dt>
873 <dd>
874 <p>Specifies which refs to fetch and which local refs to update.
875 When no &lt;refspec&gt;s appear on the command line, the refs to fetch
876 are read from <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> variables instead
877 (see <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> below).</p>
878 <div class="paragraph">
879 <p>The format of a &lt;refspec&gt; parameter is an optional plus
880 <code>+</code>, followed by the source &lt;src&gt;, followed
881 by a colon <code>:</code>, followed by the destination ref &lt;dst&gt;.
882 The colon can be omitted when &lt;dst&gt; is empty. &lt;src&gt; is
883 typically a ref, but it can also be a fully spelled hex object
884 name.</p>
885 </div>
886 <div class="paragraph">
887 <p>A &lt;refspec&gt; may contain a * in its &lt;src&gt; to indicate a simple pattern
888 match. Such a refspec functions like a glob that matches any ref with the
889 same prefix. A pattern &lt;refspec&gt; must have a * in both the &lt;src&gt; and
890 &lt;dst&gt;. It will map refs to the destination by replacing the * with the
891 contents matched from the source.</p>
892 </div>
893 <div class="paragraph">
894 <p>If a refspec is prefixed by <code>^</code>, it will be interpreted as a negative
895 refspec. Rather than specifying which refs to fetch or which local refs to
896 update, such a refspec will instead specify refs to exclude. A ref will be
897 considered to match if it matches at least one positive refspec, and does
898 not match any negative refspec. Negative refspecs can be useful to restrict
899 the scope of a pattern refspec so that it will not include specific refs.
900 Negative refspecs can themselves be pattern refspecs. However, they may only
901 contain a &lt;src&gt; and do not specify a &lt;dst&gt;. Fully spelled out hex object
902 names are also not supported.</p>
903 </div>
904 <div class="paragraph">
905 <p><code>tag</code> <em>&lt;tag&gt;</em> means the same as <code>refs/tags/</code><em>&lt;tag&gt;</em><code>:refs/tags/</code><em>&lt;tag&gt;</em>;
906 it requests fetching everything up to the given tag.</p>
907 </div>
908 <div class="paragraph">
909 <p>The remote ref that matches &lt;src&gt;
910 is fetched, and if &lt;dst&gt; is not an empty string, an attempt
911 is made to update the local ref that matches it.</p>
912 </div>
913 <div class="paragraph">
914 <p>Whether that update is allowed without <code>--force</code> depends on the ref
915 namespace it&#8217;s being fetched to, the type of object being fetched, and
916 whether the update is considered to be a fast-forward. Generally, the
917 same rules apply for fetching as when pushing, see the <em>&lt;refspec&gt;</em>...
918 section of <a href="git-push.html">git-push(1)</a> for what those are. Exceptions to those
919 rules particular to <em>git fetch</em> are noted below.</p>
920 </div>
921 <div class="paragraph">
922 <p>Until Git version 2.20, and unlike when pushing with
923 <a href="git-push.html">git-push(1)</a>, any updates to <code>refs/tags/</code>* would be accepted
924 without <code>+</code> in the refspec (or <code>--force</code>). When fetching, we promiscuously
925 considered all tag updates from a remote to be forced fetches. Since
926 Git version 2.20, fetching to update <code>refs/tags/</code>* works the same way
927 as when pushing. I.e. any updates will be rejected without <code>+</code> in the
928 refspec (or <code>--force</code>).</p>
929 </div>
930 <div class="paragraph">
931 <p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, any updates outside of
932 <code>refs/</code>{tags,heads}/* will be accepted without <code>+</code> in the refspec (or
933 <code>--force</code>), whether that&#8217;s swapping e.g. a tree object for a blob, or
934 a commit for another commit that doesn&#8217;t have the previous commit as
935 an ancestor etc.</p>
936 </div>
937 <div class="paragraph">
938 <p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, there is no
939 configuration which&#8217;ll amend these rules, and nothing like a
940 <code>pre-fetch</code> hook analogous to the <code>pre-receive</code> hook.</p>
941 </div>
942 <div class="paragraph">
943 <p>As with pushing with <a href="git-push.html">git-push(1)</a>, all of the rules described
944 above about what&#8217;s not allowed as an update can be overridden by
945 adding an optional leading <code>+</code> to a refspec (or using the <code>--force</code>
946 command line option). The only exception to this is that no amount of
947 forcing will make the <code>refs/heads/</code>* namespace accept a non-commit
948 object.</p>
949 </div>
950 <div class="admonitionblock note">
951 <table>
952 <tr>
953 <td class="icon">
954 <div class="title">Note</div>
955 </td>
956 <td class="content">
957 When the remote branch you want to fetch is known to
958 be rewound and rebased regularly, it is expected that
959 its new tip will not be a descendant of its previous tip
960 (as stored in your remote-tracking branch the last time
961 you fetched). You would want
962 to use the <code>+</code> sign to indicate non-fast-forward updates
963 will be needed for such branches. There is no way to
964 determine or declare that a branch will be made available
965 in a repository with this behavior; the pulling user simply
966 must know this is the expected usage pattern for a branch.
967 </td>
968 </tr>
969 </table>
970 </div>
971 </dd>
972 <dt class="hdlist1">--stdin</dt>
973 <dd>
974 <p>Read refspecs, one per line, from stdin in addition to those provided
975 as arguments. The "tag &lt;name&gt;" format is not supported.</p>
976 </dd>
977 </dl>
978 </div>
979 </div>
980 </div>
981 <div class="sect1">
982 <h2 id="_git_urls">GIT URLS<a id="URLS"></a></h2>
983 <div class="sectionbody">
984 <div class="paragraph">
985 <p>In general, URLs contain information about the transport protocol, the
986 address of the remote server, and the path to the repository.
987 Depending on the transport protocol, some of this information may be
988 absent.</p>
989 </div>
990 <div class="paragraph">
991 <p>Git supports ssh, git, http, and https protocols (in addition, ftp
992 and ftps can be used for fetching, but this is inefficient and
993 deprecated; do not use them).</p>
994 </div>
995 <div class="paragraph">
996 <p>The native transport (i.e. <code>git://</code> URL) does no authentication and
997 should be used with caution on unsecured networks.</p>
998 </div>
999 <div class="paragraph">
1000 <p>The following syntaxes may be used with them:</p>
1001 </div>
1002 <div class="ulist">
1003 <ul>
1004 <li>
1005 <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>
1006 </li>
1007 <li>
1008 <p><code>git://</code><em>&lt;host&gt;</em>[<code>:</code><em>&lt;port&gt;</em>]<code>/</code><em>&lt;path-to-git-repo&gt;</em></p>
1009 </li>
1010 <li>
1011 <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>
1012 </li>
1013 <li>
1014 <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>
1015 </li>
1016 </ul>
1017 </div>
1018 <div class="paragraph">
1019 <p>An alternative scp-like syntax may also be used with the ssh protocol:</p>
1020 </div>
1021 <div class="ulist">
1022 <ul>
1023 <li>
1024 <p>[<em>&lt;user&gt;</em><code>@</code>]<em>&lt;host&gt;</em><code>:/</code><em>&lt;path-to-git-repo&gt;</em></p>
1025 </li>
1026 </ul>
1027 </div>
1028 <div class="paragraph">
1029 <p>This syntax is only recognized if there are no slashes before the
1030 first colon. This helps differentiate a local path that contains a
1031 colon. For example the local path <code>foo:bar</code> could be specified as an
1032 absolute path or .<code>/foo:bar</code> to avoid being misinterpreted as an ssh
1033 url.</p>
1034 </div>
1035 <div class="paragraph">
1036 <p>The ssh and git protocols additionally support <code>~</code><em>&lt;username&gt;</em> expansion:</p>
1037 </div>
1038 <div class="ulist">
1039 <ul>
1040 <li>
1041 <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>
1042 </li>
1043 <li>
1044 <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>
1045 </li>
1046 <li>
1047 <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>
1048 </li>
1049 </ul>
1050 </div>
1051 <div class="paragraph">
1052 <p>For local repositories, also supported by Git natively, the following
1053 syntaxes may be used:</p>
1054 </div>
1055 <div class="ulist">
1056 <ul>
1057 <li>
1058 <p><code>/path/to/repo.git/</code></p>
1059 </li>
1060 <li>
1061 <p><code>file:///path/to/repo.git/</code></p>
1062 </li>
1063 </ul>
1064 </div>
1065 <div class="paragraph">
1066 <p>These two syntaxes are mostly equivalent, except when cloning, when
1067 the former implies <code>--local</code> option. See <a href="git-clone.html">git-clone(1)</a> for
1068 details.</p>
1069 </div>
1070 <div class="paragraph">
1071 <p><code>git</code> <code>clone</code>, <code>git</code> <code>fetch</code> and <code>git</code> <code>pull</code>, but not <code>git</code> <code>push</code>, will also
1072 accept a suitable bundle file. See <a href="git-bundle.html">git-bundle(1)</a>.</p>
1073 </div>
1074 <div class="paragraph">
1075 <p>When Git doesn&#8217;t know how to handle a certain transport protocol, it
1076 attempts to use the <code>remote-</code><em>&lt;transport&gt;</em> remote helper, if one
1077 exists. To explicitly request a remote helper, the following syntax
1078 may be used:</p>
1079 </div>
1080 <div class="ulist">
1081 <ul>
1082 <li>
1083 <p><em>&lt;transport&gt;</em><code>::</code><em>&lt;address&gt;</em></p>
1084 </li>
1085 </ul>
1086 </div>
1087 <div class="paragraph">
1088 <p>where <em>&lt;address&gt;</em> may be a path, a server and path, or an arbitrary
1089 URL-like string recognized by the specific remote helper being
1090 invoked. See <a href="gitremote-helpers.html">gitremote-helpers(7)</a> for details.</p>
1091 </div>
1092 <div class="paragraph">
1093 <p>If there are a large number of similarly-named remote repositories and
1094 you want to use a different format for them (such that the URLs you
1095 use will be rewritten into URLs that work), you can create a
1096 configuration section of the form:</p>
1097 </div>
1098 <div class="verseblock">
1099 <pre class="content"> [url "<em>&lt;actual-url-base&gt;</em>"]
1100 insteadOf = <em>&lt;other-url-base&gt;</em></pre>
1101 </div>
1102 <div class="paragraph">
1103 <p>For example, with this:</p>
1104 </div>
1105 <div class="listingblock">
1106 <div class="content">
1107 <pre> [url "git://git.host.xz/"]
1108 insteadOf = host.xz:/path/to/
1109 insteadOf = work:</pre>
1110 </div>
1111 </div>
1112 <div class="paragraph">
1113 <p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
1114 rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p>
1115 </div>
1116 <div class="paragraph">
1117 <p>If you want to rewrite URLs for push only, you can create a
1118 configuration section of the form:</p>
1119 </div>
1120 <div class="verseblock">
1121 <pre class="content"> [url "<em>&lt;actual-url-base&gt;</em>"]
1122 pushInsteadOf = <em>&lt;other-url-base&gt;</em></pre>
1123 </div>
1124 <div class="paragraph">
1125 <p>For example, with this:</p>
1126 </div>
1127 <div class="listingblock">
1128 <div class="content">
1129 <pre> [url "ssh://example.org/"]
1130 pushInsteadOf = git://example.org/</pre>
1131 </div>
1132 </div>
1133 <div class="paragraph">
1134 <p>a URL like "git://example.org/path/to/repo.git" will be rewritten to
1135 "ssh://example.org/path/to/repo.git" for pushes, but pulls will still
1136 use the original URL.</p>
1137 </div>
1138 </div>
1139 </div>
1140 <div class="sect1">
1141 <h2 id="_remotes">REMOTES<a id="REMOTES"></a></h2>
1142 <div class="sectionbody">
1143 <div class="paragraph">
1144 <p>The name of one of the following can be used instead
1145 of a URL as <em>&lt;repository&gt;</em> argument:</p>
1146 </div>
1147 <div class="ulist">
1148 <ul>
1149 <li>
1150 <p>a remote in the Git configuration file: <code>$GIT_DIR/config</code>,</p>
1151 </li>
1152 <li>
1153 <p>a file in the <code>$GIT_DIR/remotes</code> directory, or</p>
1154 </li>
1155 <li>
1156 <p>a file in the <code>$GIT_DIR/branches</code> directory.</p>
1157 </li>
1158 </ul>
1159 </div>
1160 <div class="paragraph">
1161 <p>All of these also allow you to omit the refspec from the command line
1162 because they each contain a refspec which git will use by default.</p>
1163 </div>
1164 <div class="sect2">
1165 <h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3>
1166 <div class="paragraph">
1167 <p>You can choose to provide the name of a remote which you had previously
1168 configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a>
1169 or even by a manual edit to the <code>$GIT_DIR/config</code> file. The URL of
1170 this remote will be used to access the repository. The refspec
1171 of this remote will be used by default when you do
1172 not provide a refspec on the command line. The entry in the
1173 config file would appear like this:</p>
1174 </div>
1175 <div class="listingblock">
1176 <div class="content">
1177 <pre> [remote "&lt;name&gt;"]
1178 url = &lt;URL&gt;
1179 pushurl = &lt;pushurl&gt;
1180 push = &lt;refspec&gt;
1181 fetch = &lt;refspec&gt;</pre>
1182 </div>
1183 </div>
1184 <div class="paragraph">
1185 <p>The <em>&lt;pushurl&gt;</em> is used for pushes only. It is optional and defaults
1186 to <em>&lt;URL&gt;</em>. Pushing to a remote affects all defined pushurls or all
1187 defined urls if no pushurls are defined. Fetch, however, will only
1188 fetch from the first defined url if multiple urls are defined.</p>
1189 </div>
1190 </div>
1191 <div class="sect2">
1192 <h3 id="_named_file_in_git_dirremotes">Named file in <code>$GIT_DIR/remotes</code></h3>
1193 <div class="paragraph">
1194 <p>You can choose to provide the name of a
1195 file in <code>$GIT_DIR/remotes</code>. The URL
1196 in this file will be used to access the repository. The refspec
1197 in this file will be used as default when you do not
1198 provide a refspec on the command line. This file should have the
1199 following format:</p>
1200 </div>
1201 <div class="listingblock">
1202 <div class="content">
1203 <pre> URL: one of the above URL formats
1204 Push: &lt;refspec&gt;
1205 Pull: &lt;refspec&gt;</pre>
1206 </div>
1207 </div>
1208 <div class="paragraph">
1209 <p><code>Push:</code> lines are used by <em>git push</em> and
1210 <code>Pull:</code> lines are used by <em>git pull</em> and <em>git fetch</em>.
1211 Multiple <code>Push:</code> and <code>Pull:</code> lines may
1212 be specified for additional branch mappings.</p>
1213 </div>
1214 </div>
1215 <div class="sect2">
1216 <h3 id="_named_file_in_git_dirbranches">Named file in <code>$GIT_DIR/branches</code></h3>
1217 <div class="paragraph">
1218 <p>You can choose to provide the name of a
1219 file in <code>$GIT_DIR/branches</code>.
1220 The URL in this file will be used to access the repository.
1221 This file should have the following format:</p>
1222 </div>
1223 <div class="listingblock">
1224 <div class="content">
1225 <pre> &lt;URL&gt;#&lt;head&gt;</pre>
1226 </div>
1227 </div>
1228 <div class="paragraph">
1229 <p><em>&lt;URL&gt;</em> is required; #<em>&lt;head&gt;</em> is optional.</p>
1230 </div>
1231 <div class="paragraph">
1232 <p>Depending on the operation, git will use one of the following
1233 refspecs, if you don&#8217;t provide one on the command line.
1234 <em>&lt;branch&gt;</em> is the name of this file in <code>$GIT_DIR/branches</code> and
1235 <em>&lt;head&gt;</em> defaults to <code>master</code>.</p>
1236 </div>
1237 <div class="paragraph">
1238 <p>git fetch uses:</p>
1239 </div>
1240 <div class="listingblock">
1241 <div class="content">
1242 <pre> refs/heads/&lt;head&gt;:refs/heads/&lt;branch&gt;</pre>
1243 </div>
1244 </div>
1245 <div class="paragraph">
1246 <p>git push uses:</p>
1247 </div>
1248 <div class="listingblock">
1249 <div class="content">
1250 <pre> HEAD:refs/heads/&lt;head&gt;</pre>
1251 </div>
1252 </div>
1253 </div>
1254 </div>
1255 </div>
1256 <div class="sect1">
1257 <h2 id="_configured_remote_tracking_branches">CONFIGURED REMOTE-TRACKING BRANCHES<a id="CRTB"></a></h2>
1258 <div class="sectionbody">
1259 <div class="paragraph">
1260 <p>You often interact with the same remote repository by
1261 regularly and repeatedly fetching from it. In order to keep track
1262 of the progress of such a remote repository, <code>git</code> <code>fetch</code> allows you
1263 to configure <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> configuration variables.</p>
1264 </div>
1265 <div class="paragraph">
1266 <p>Typically such a variable may look like this:</p>
1267 </div>
1268 <div class="listingblock">
1269 <div class="content">
1270 <pre>[remote "origin"]
1271 fetch = +refs/heads/*:refs/remotes/origin/*</pre>
1272 </div>
1273 </div>
1274 <div class="paragraph">
1275 <p>This configuration is used in two ways:</p>
1276 </div>
1277 <div class="ulist">
1278 <ul>
1279 <li>
1280 <p>When <code>git</code> <code>fetch</code> is run without specifying what branches
1281 and/or tags to fetch on the command line, e.g. <code>git</code> <code>fetch</code> <code>origin</code>
1282 or <code>git</code> <code>fetch</code>, <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> values are used as
1283 the refspecs&#8212;&#8203;they specify which refs to fetch and which local refs
1284 to update. The example above will fetch
1285 all branches that exist in the <code>origin</code> (i.e. any ref that matches
1286 the left-hand side of the value, <code>refs/heads/</code>*) and update the
1287 corresponding remote-tracking branches in the <code>refs/remotes/origin/</code>*
1288 hierarchy.</p>
1289 </li>
1290 <li>
1291 <p>When <code>git</code> <code>fetch</code> is run with explicit branches and/or tags
1292 to fetch on the command line, e.g. <code>git</code> <code>fetch</code> <code>origin</code> <code>master</code>, the
1293 &lt;refspec&gt;s given on the command line determine what are to be
1294 fetched (e.g. <code>master</code> in the example,
1295 which is a short-hand for <code>master:</code>, which in turn means
1296 "fetch the <em>master</em> branch but I do not explicitly say what
1297 remote-tracking branch to update with it from the command line"),
1298 and the example command will
1299 fetch <em>only</em> the <em>master</em> branch. The <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code>
1300 values determine which
1301 remote-tracking branch, if any, is updated. When used in this
1302 way, the <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> values do not have any
1303 effect in deciding <em>what</em> gets fetched (i.e. the values are not
1304 used as refspecs when the command-line lists refspecs); they are
1305 only used to decide <em>where</em> the refs that are fetched are stored
1306 by acting as a mapping.</p>
1307 </li>
1308 </ul>
1309 </div>
1310 <div class="paragraph">
1311 <p>The latter use of the <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> values can be
1312 overridden by giving the <code>--refmap=</code><em>&lt;refspec&gt;</em> parameter(s) on the
1313 command line.</p>
1314 </div>
1315 </div>
1316 </div>
1317 <div class="sect1">
1318 <h2 id="_pruning">PRUNING</h2>
1319 <div class="sectionbody">
1320 <div class="paragraph">
1321 <p>Git has a default disposition of keeping data unless it&#8217;s explicitly
1322 thrown away; this extends to holding onto local references to branches
1323 on remotes that have themselves deleted those branches.</p>
1324 </div>
1325 <div class="paragraph">
1326 <p>If left to accumulate, these stale references might make performance
1327 worse on big and busy repos that have a lot of branch churn, and
1328 e.g. make the output of commands like <code>git</code> <code>branch</code> <code>-a</code> <code>--contains</code>
1329 <em>&lt;commit&gt;</em> needlessly verbose, as well as impacting anything else
1330 that&#8217;ll work with the complete set of known references.</p>
1331 </div>
1332 <div class="paragraph">
1333 <p>These remote-tracking references can be deleted as a one-off with
1334 either of:</p>
1335 </div>
1336 <div class="listingblock">
1337 <div class="content">
1338 <pre># While fetching
1339 $ git fetch --prune &lt;name&gt;
1341 # Only prune, don't fetch
1342 $ git remote prune &lt;name&gt;</pre>
1343 </div>
1344 </div>
1345 <div class="paragraph">
1346 <p>To prune references as part of your normal workflow without needing to
1347 remember to run that, set <code>fetch.prune</code> globally, or
1348 <code>remote.</code><em>&lt;name&gt;</em><code>.prune</code> per-remote in the config. See
1349 <a href="git-config.html">git-config(1)</a>.</p>
1350 </div>
1351 <div class="paragraph">
1352 <p>Here&#8217;s where things get tricky and more specific. The pruning feature
1353 doesn&#8217;t actually care about branches, instead it&#8217;ll prune local &#8592;&#8594;
1354 remote-references as a function of the refspec of the remote (see
1355 <em>&lt;refspec&gt;</em> and <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> above).</p>
1356 </div>
1357 <div class="paragraph">
1358 <p>Therefore if the refspec for the remote includes
1359 e.g. <code>refs/tags/</code>*:refs/tags/*, or you manually run e.g. <code>git</code> <code>fetch</code>
1360 <code>--prune</code> <em>&lt;name&gt;</em> "refs/tags/*:refs/tags/*" it won&#8217;t be stale remote
1361 tracking branches that are deleted, but any local tag that doesn&#8217;t
1362 exist on the remote.</p>
1363 </div>
1364 <div class="paragraph">
1365 <p>This might not be what you expect, i.e. you want to prune remote
1366 <em>&lt;name&gt;</em>, but also explicitly fetch tags from it, so when you fetch
1367 from it you delete all your local tags, most of which may not have
1368 come from the <em>&lt;name&gt;</em> remote in the first place.</p>
1369 </div>
1370 <div class="paragraph">
1371 <p>So be careful when using this with a refspec like
1372 <code>refs/tags/</code>*:refs/tags/*, or any other refspec which might map
1373 references from multiple remotes to the same local namespace.</p>
1374 </div>
1375 <div class="paragraph">
1376 <p>Since keeping up-to-date with both branches and tags on the remote is
1377 a common use-case the <code>--prune-tags</code> option can be supplied along with
1378 <code>--prune</code> to prune local tags that don&#8217;t exist on the remote, and
1379 force-update those tags that differ. Tag pruning can also be enabled
1380 with <code>fetch.pruneTags</code> or <code>remote.</code><em>&lt;name&gt;</em><code>.pruneTags</code> in the config. See
1381 <a href="git-config.html">git-config(1)</a>.</p>
1382 </div>
1383 <div class="paragraph">
1384 <p>The <code>--prune-tags</code> option is equivalent to having
1385 <code>refs/tags/</code>*:refs/tags/* declared in the refspecs of the remote. This
1386 can lead to some seemingly strange interactions:</p>
1387 </div>
1388 <div class="listingblock">
1389 <div class="content">
1390 <pre># These both fetch tags
1391 $ git fetch --no-tags origin 'refs/tags/*:refs/tags/*'
1392 $ git fetch --no-tags --prune-tags origin</pre>
1393 </div>
1394 </div>
1395 <div class="paragraph">
1396 <p>The reason it doesn&#8217;t error out when provided without <code>--prune</code> or its
1397 config versions is for flexibility of the configured versions, and to
1398 maintain a 1=1 mapping between what the command line flags do, and
1399 what the configuration versions do.</p>
1400 </div>
1401 <div class="paragraph">
1402 <p>It&#8217;s reasonable to e.g. configure <code>fetch.pruneTags=true</code> in
1403 <code>~/.gitconfig</code> to have tags pruned whenever <code>git</code> <code>fetch</code> <code>--prune</code> is
1404 run, without making every invocation of <code>git</code> <code>fetch</code> without <code>--prune</code>
1405 an error.</p>
1406 </div>
1407 <div class="paragraph">
1408 <p>Pruning tags with <code>--prune-tags</code> also works when fetching a URL
1409 instead of a named remote. These will all prune tags not found on
1410 origin:</p>
1411 </div>
1412 <div class="listingblock">
1413 <div class="content">
1414 <pre>$ git fetch origin --prune --prune-tags
1415 $ git fetch origin --prune 'refs/tags/*:refs/tags/*'
1416 $ git fetch &lt;url-of-origin&gt; --prune --prune-tags
1417 $ git fetch &lt;url-of-origin&gt; --prune 'refs/tags/*:refs/tags/*'</pre>
1418 </div>
1419 </div>
1420 </div>
1421 </div>
1422 <div class="sect1">
1423 <h2 id="_output">OUTPUT</h2>
1424 <div class="sectionbody">
1425 <div class="paragraph">
1426 <p>The output of "git fetch" depends on the transport method used; this
1427 section describes the output when fetching over the Git protocol
1428 (either locally or via ssh) and Smart HTTP protocol.</p>
1429 </div>
1430 <div class="paragraph">
1431 <p>The status of the fetch is output in tabular form, with each line
1432 representing the status of a single ref. Each line is of the form:</p>
1433 </div>
1434 <div class="listingblock">
1435 <div class="content">
1436 <pre> &lt;flag&gt; &lt;summary&gt; &lt;from&gt; -&gt; &lt;to&gt; [&lt;reason&gt;]</pre>
1437 </div>
1438 </div>
1439 <div class="paragraph">
1440 <p>When using <code>--porcelain</code>, the output format is intended to be
1441 machine-parseable. In contrast to the human-readable output formats it
1442 thus prints to standard output instead of standard error. Each line is
1443 of the form:</p>
1444 </div>
1445 <div class="listingblock">
1446 <div class="content">
1447 <pre>&lt;flag&gt; &lt;old-object-id&gt; &lt;new-object-id&gt; &lt;local-reference&gt;</pre>
1448 </div>
1449 </div>
1450 <div class="paragraph">
1451 <p>The status of up-to-date refs is shown only if the --verbose option is
1452 used.</p>
1453 </div>
1454 <div class="paragraph">
1455 <p>In compact output mode, specified with configuration variable
1456 fetch.output, if either entire <em>&lt;from&gt;</em> or <em>&lt;to&gt;</em> is found in the
1457 other string, it will be substituted with * in the other string. For
1458 example, <code>master</code> <code>-</code>&gt; <code>origin/master</code> becomes <code>master</code> <code>-</code>&gt; <code>origin/</code>*.</p>
1459 </div>
1460 <div class="dlist">
1461 <dl>
1462 <dt class="hdlist1">flag</dt>
1463 <dd>
1464 <p>A single character indicating the status of the ref:</p>
1465 <div class="dlist">
1466 <dl>
1467 <dt class="hdlist1">(space)</dt>
1468 <dd>
1469 <p>for a successfully fetched fast-forward;</p>
1470 </dd>
1471 <dt class="hdlist1"><code>+</code></dt>
1472 <dd>
1473 <p>for a successful forced update;</p>
1474 </dd>
1475 <dt class="hdlist1"><code>-</code></dt>
1476 <dd>
1477 <p>for a successfully pruned ref;</p>
1478 </dd>
1479 <dt class="hdlist1"><code>t</code></dt>
1480 <dd>
1481 <p>for a successful tag update;</p>
1482 </dd>
1483 <dt class="hdlist1">*</dt>
1484 <dd>
1485 <p>for a successfully fetched new ref;</p>
1486 </dd>
1487 <dt class="hdlist1">!</dt>
1488 <dd>
1489 <p>for a ref that was rejected or failed to update; and</p>
1490 </dd>
1491 <dt class="hdlist1"><code>=</code></dt>
1492 <dd>
1493 <p>for a ref that was up to date and did not need fetching.</p>
1494 </dd>
1495 </dl>
1496 </div>
1497 </dd>
1498 <dt class="hdlist1">summary</dt>
1499 <dd>
1500 <p>For a successfully fetched ref, the summary shows the old and new
1501 values of the ref in a form suitable for using as an argument to
1502 <code>git</code> <code>log</code> (this is <em>&lt;old&gt;</em><code>..</code><em>&lt;new&gt;</em> in most cases, and
1503 <em>&lt;old&gt;</em><code>...</code><em>&lt;new&gt;</em> for forced non-fast-forward updates).</p>
1504 </dd>
1505 <dt class="hdlist1">from</dt>
1506 <dd>
1507 <p>The name of the remote ref being fetched from, minus its
1508 <code>refs/</code><em>&lt;type&gt;</em><code>/</code> prefix. In the case of deletion, the name of
1509 the remote ref is "(none)".</p>
1510 </dd>
1511 <dt class="hdlist1">to</dt>
1512 <dd>
1513 <p>The name of the local ref being updated, minus its
1514 <code>refs/</code><em>&lt;type&gt;</em><code>/</code> prefix.</p>
1515 </dd>
1516 <dt class="hdlist1">reason</dt>
1517 <dd>
1518 <p>A human-readable explanation. In the case of successfully fetched
1519 refs, no explanation is needed. For a failed ref, the reason for
1520 failure is described.</p>
1521 </dd>
1522 </dl>
1523 </div>
1524 </div>
1525 </div>
1526 <div class="sect1">
1527 <h2 id="_examples">EXAMPLES</h2>
1528 <div class="sectionbody">
1529 <div class="ulist">
1530 <ul>
1531 <li>
1532 <p>Update the remote-tracking branches:</p>
1533 <div class="listingblock">
1534 <div class="content">
1535 <pre>$ git fetch origin</pre>
1536 </div>
1537 </div>
1538 <div class="paragraph">
1539 <p>The above command copies all branches from the remote <code>refs/heads/</code>
1540 namespace and stores them to the local <code>refs/remotes/origin/</code> namespace,
1541 unless the <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> option is used to specify a
1542 non-default refspec.</p>
1543 </div>
1544 </li>
1545 <li>
1546 <p>Using refspecs explicitly:</p>
1547 <div class="listingblock">
1548 <div class="content">
1549 <pre>$ git fetch origin +seen:seen maint:tmp</pre>
1550 </div>
1551 </div>
1552 <div class="paragraph">
1553 <p>This updates (or creates, as necessary) branches <code>seen</code> and <code>tmp</code> in
1554 the local repository by fetching from the branches (respectively)
1555 <code>seen</code> and <code>maint</code> from the remote repository.</p>
1556 </div>
1557 <div class="paragraph">
1558 <p>The <code>seen</code> branch will be updated even if it does not fast-forward,
1559 because it is prefixed with a plus sign; <code>tmp</code> will not be.</p>
1560 </div>
1561 </li>
1562 <li>
1563 <p>Peek at a remote&#8217;s branch, without configuring the remote in your local
1564 repository:</p>
1565 <div class="listingblock">
1566 <div class="content">
1567 <pre>$ git fetch git://git.kernel.org/pub/scm/git/git.git maint
1568 $ git log FETCH_HEAD</pre>
1569 </div>
1570 </div>
1571 <div class="paragraph">
1572 <p>The first command fetches the <code>maint</code> branch from the repository at
1573 <code>git://git.kernel.org/pub/scm/git/git.git</code> and the second command uses
1574 <code>FETCH_HEAD</code> to examine the branch with <a href="git-log.html">git-log(1)</a>. The fetched
1575 objects will eventually be removed by git&#8217;s built-in housekeeping (see
1576 <a href="git-gc.html">git-gc(1)</a>).</p>
1577 </div>
1578 </li>
1579 </ul>
1580 </div>
1581 </div>
1582 </div>
1583 <div class="sect1">
1584 <h2 id="_security">SECURITY</h2>
1585 <div class="sectionbody">
1586 <div class="paragraph">
1587 <p>The fetch and push protocols are not designed to prevent one side from
1588 stealing data from the other repository that was not intended to be
1589 shared. If you have private data that you need to protect from a malicious
1590 peer, your best option is to store it in another repository. This applies
1591 to both clients and servers. In particular, namespaces on a server are not
1592 effective for read access control; you should only grant read access to a
1593 namespace to clients that you would trust with read access to the entire
1594 repository.</p>
1595 </div>
1596 <div class="paragraph">
1597 <p>The known attack vectors are as follows:</p>
1598 </div>
1599 <div class="olist arabic">
1600 <ol class="arabic">
1601 <li>
1602 <p>The victim sends "have" lines advertising the IDs of objects it has that
1603 are not explicitly intended to be shared but can be used to optimize the
1604 transfer if the peer also has them. The attacker chooses an object ID X
1605 to steal and sends a ref to X, but isn&#8217;t required to send the content of
1606 X because the victim already has it. Now the victim believes that the
1607 attacker has X, and it sends the content of X back to the attacker
1608 later. (This attack is most straightforward for a client to perform on a
1609 server, by creating a ref to X in the namespace the client has access
1610 to and then fetching it. The most likely way for a server to perform it
1611 on a client is to "merge" X into a public branch and hope that the user
1612 does additional work on this branch and pushes it back to the server
1613 without noticing the merge.)</p>
1614 </li>
1615 <li>
1616 <p>As in #1, the attacker chooses an object ID X to steal. The victim sends
1617 an object Y that the attacker already has, and the attacker falsely
1618 claims to have X and not Y, so the victim sends Y as a delta against X.
1619 The delta reveals regions of X that are similar to Y to the attacker.</p>
1620 </li>
1621 </ol>
1622 </div>
1623 </div>
1624 </div>
1625 <div class="sect1">
1626 <h2 id="_configuration">CONFIGURATION</h2>
1627 <div class="sectionbody">
1628 <div class="paragraph">
1629 <p>Everything below this line in this section is selectively included
1630 from the <a href="git-config.html">git-config(1)</a> documentation. The content is the same
1631 as what&#8217;s found there:</p>
1632 </div>
1633 <div class="dlist">
1634 <dl>
1635 <dt class="hdlist1">fetch.recurseSubmodules</dt>
1636 <dd>
1637 <p>This option controls whether <code>git</code> <code>fetch</code> (and the underlying fetch
1638 in <code>git</code> <code>pull</code>) will recursively fetch into populated submodules.
1639 This option can be set either to a boolean value or to <em>on-demand</em>.
1640 Setting it to a boolean changes the behavior of fetch and pull to
1641 recurse unconditionally into submodules when set to true or to not
1642 recurse at all when set to false. When set to <em>on-demand</em>, fetch and
1643 pull will only recurse into a populated submodule when its
1644 superproject retrieves a commit that updates the submodule&#8217;s
1645 reference.
1646 Defaults to <em>on-demand</em>, or to the value of <em>submodule.recurse</em> if set.</p>
1647 </dd>
1648 <dt class="hdlist1">fetch.fsckObjects</dt>
1649 <dd>
1650 <p>If it is set to true, git-fetch-pack will check all fetched
1651 objects. See <code>transfer.fsckObjects</code> for what&#8217;s
1652 checked. Defaults to false. If not set, the value of
1653 <code>transfer.fsckObjects</code> is used instead.</p>
1654 </dd>
1655 <dt class="hdlist1">fetch.fsck.&lt;msg-id&gt;</dt>
1656 <dd>
1657 <p>Acts like <code>fsck.</code><em>&lt;msg-id&gt;</em>, but is used by
1658 <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See
1659 the <code>fsck.</code><em>&lt;msg-id&gt;</em> documentation for details.</p>
1660 </dd>
1661 <dt class="hdlist1">fetch.fsck.skipList</dt>
1662 <dd>
1663 <p>Acts like <code>fsck.skipList</code>, but is used by
1664 <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See
1665 the <code>fsck.skipList</code> documentation for details.</p>
1666 </dd>
1667 <dt class="hdlist1">fetch.unpackLimit</dt>
1668 <dd>
1669 <p>If the number of objects fetched over the Git native
1670 transfer is below this
1671 limit, then the objects will be unpacked into loose object
1672 files. However if the number of received objects equals or
1673 exceeds this limit then the received pack will be stored as
1674 a pack, after adding any missing delta bases. Storing the
1675 pack from a push can make the push operation complete faster,
1676 especially on slow filesystems. If not set, the value of
1677 <code>transfer.unpackLimit</code> is used instead.</p>
1678 </dd>
1679 <dt class="hdlist1">fetch.prune</dt>
1680 <dd>
1681 <p>If true, fetch will automatically behave as if the <code>--prune</code>
1682 option was given on the command line. See also <code>remote.</code><em>&lt;name&gt;</em><code>.prune</code>
1683 and the PRUNING section of <a href="git-fetch.html">git-fetch(1)</a>.</p>
1684 </dd>
1685 <dt class="hdlist1">fetch.pruneTags</dt>
1686 <dd>
1687 <p>If true, fetch will automatically behave as if the
1688 <code>refs/tags/</code>*:refs/tags/* refspec was provided when pruning,
1689 if not set already. This allows for setting both this option
1690 and <code>fetch.prune</code> to maintain a 1=1 mapping to upstream
1691 refs. See also <code>remote.</code><em>&lt;name&gt;</em><code>.pruneTags</code> and the PRUNING
1692 section of <a href="git-fetch.html">git-fetch(1)</a>.</p>
1693 </dd>
1694 <dt class="hdlist1">fetch.all</dt>
1695 <dd>
1696 <p>If true, fetch will attempt to update all available remotes.
1697 This behavior can be overridden by passing <code>--no-all</code> or by
1698 explicitly specifying one or more remote(s) to fetch from.
1699 Defaults to false.</p>
1700 </dd>
1701 <dt class="hdlist1">fetch.output</dt>
1702 <dd>
1703 <p>Control how ref update status is printed. Valid values are
1704 <code>full</code> and <code>compact</code>. Default value is <code>full</code>. See the
1705 OUTPUT section in <a href="git-fetch.html">git-fetch(1)</a> for details.</p>
1706 </dd>
1707 <dt class="hdlist1">fetch.negotiationAlgorithm</dt>
1708 <dd>
1709 <p>Control how information about the commits in the local repository
1710 is sent when negotiating the contents of the packfile to be sent by
1711 the server. Set to "consecutive" to use an algorithm that walks
1712 over consecutive commits checking each one. Set to "skipping" to
1713 use an algorithm that skips commits in an effort to converge
1714 faster, but may result in a larger-than-necessary packfile; or set
1715 to "noop" to not send any information at all, which will almost
1716 certainly result in a larger-than-necessary packfile, but will skip
1717 the negotiation step. Set to "default" to override settings made
1718 previously and use the default behaviour. The default is normally
1719 "consecutive", but if <code>feature.experimental</code> is true, then the
1720 default is "skipping". Unknown values will cause <em>git fetch</em> to
1721 error out.</p>
1722 <div class="paragraph">
1723 <p>See also the <code>--negotiate-only</code> and <code>--negotiation-tip</code> options to
1724 <a href="git-fetch.html">git-fetch(1)</a>.</p>
1725 </div>
1726 </dd>
1727 <dt class="hdlist1">fetch.showForcedUpdates</dt>
1728 <dd>
1729 <p>Set to false to enable <code>--no-show-forced-updates</code> in
1730 <a href="git-fetch.html">git-fetch(1)</a> and <a href="git-pull.html">git-pull(1)</a> commands.
1731 Defaults to true.</p>
1732 </dd>
1733 <dt class="hdlist1">fetch.parallel</dt>
1734 <dd>
1735 <p>Specifies the maximal number of fetch operations to be run in parallel
1736 at a time (submodules, or remotes when the <code>--multiple</code> option of
1737 <a href="git-fetch.html">git-fetch(1)</a> is in effect).</p>
1738 <div class="paragraph">
1739 <p>A value of 0 will give some reasonable default. If unset, it defaults to 1.</p>
1740 </div>
1741 <div class="paragraph">
1742 <p>For submodules, this setting can be overridden using the <code>submodule.fetchJobs</code>
1743 config setting.</p>
1744 </div>
1745 </dd>
1746 <dt class="hdlist1">fetch.writeCommitGraph</dt>
1747 <dd>
1748 <p>Set to true to write a commit-graph after every <code>git</code> <code>fetch</code> command
1749 that downloads a pack-file from a remote. Using the <code>--split</code> option,
1750 most executions will create a very small commit-graph file on top of
1751 the existing commit-graph file(s). Occasionally, these files will
1752 merge and the write may take longer. Having an updated commit-graph
1753 file helps performance of many Git commands, including <code>git</code> <code>merge-base</code>,
1754 <code>git</code> <code>push</code> <code>-f</code>, and <code>git</code> <code>log</code> <code>--graph</code>. Defaults to false.</p>
1755 </dd>
1756 <dt class="hdlist1">fetch.bundleURI</dt>
1757 <dd>
1758 <p>This value stores a URI for downloading Git object data from a bundle
1759 URI before performing an incremental fetch from the origin Git server.
1760 This is similar to how the <code>--bundle-uri</code> option behaves in
1761 <a href="git-clone.html">git-clone(1)</a>. <code>git</code> <code>clone</code> <code>--bundle-uri</code> will set the
1762 <code>fetch.bundleURI</code> value if the supplied bundle URI contains a bundle
1763 list that is organized for incremental fetches.</p>
1764 <div class="paragraph">
1765 <p>If you modify this value and your repository has a <code>fetch.bundleCreationToken</code>
1766 value, then remove that <code>fetch.bundleCreationToken</code> value before fetching from
1767 the new bundle URI.</p>
1768 </div>
1769 </dd>
1770 <dt class="hdlist1">fetch.bundleCreationToken</dt>
1771 <dd>
1772 <p>When using <code>fetch.bundleURI</code> to fetch incrementally from a bundle
1773 list that uses the "creationToken" heuristic, this config value
1774 stores the maximum <code>creationToken</code> value of the downloaded bundles.
1775 This value is used to prevent downloading bundles in the future
1776 if the advertised <code>creationToken</code> is not strictly larger than this
1777 value.</p>
1778 <div class="paragraph">
1779 <p>The creation token values are chosen by the provider serving the specific
1780 bundle URI. If you modify the URI at <code>fetch.bundleURI</code>, then be sure to
1781 remove the value for the <code>fetch.bundleCreationToken</code> value before fetching.</p>
1782 </div>
1783 </dd>
1784 </dl>
1785 </div>
1786 </div>
1787 </div>
1788 <div class="sect1">
1789 <h2 id="_bugs">BUGS</h2>
1790 <div class="sectionbody">
1791 <div class="paragraph">
1792 <p>Using --recurse-submodules can only fetch new commits in submodules that are
1793 present locally e.g. in <code>$GIT_DIR/modules/</code>. If the upstream adds a new
1794 submodule, that submodule cannot be fetched until it is cloned e.g. by <code>git</code>
1795 <code>submodule</code> <code>update</code>. This is expected to be fixed in a future Git version.</p>
1796 </div>
1797 </div>
1798 </div>
1799 <div class="sect1">
1800 <h2 id="_see_also">SEE ALSO</h2>
1801 <div class="sectionbody">
1802 <div class="paragraph">
1803 <p><a href="git-pull.html">git-pull(1)</a></p>
1804 </div>
1805 </div>
1806 </div>
1807 <div class="sect1">
1808 <h2 id="_git">GIT</h2>
1809 <div class="sectionbody">
1810 <div class="paragraph">
1811 <p>Part of the <a href="git.html">git(1)</a> suite</p>
1812 </div>
1813 </div>
1814 </div>
1815 </div>
1816 <div id="footer">
1817 <div id="footer-text">
1818 Last updated 2024-02-08 15:45:59 -0800
1819 </div>
1820 </div>
1821 </body>
1822 </html>