Autogenerated HTML docs for v2.47.0-229-g8f8d6
[git-htmldocs.git] / git-fetch.html
blobd014c27f8b7aa66de487538a91d600332706d971
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.
833 When no <code>--server-option=</code><em>&lt;option&gt;</em> is given from the command line,
834 the values of configuration variable <code>remote.</code><em>&lt;name&gt;</em><code>.serverOption</code>
835 are used instead.</p>
836 </dd>
837 <dt class="hdlist1">--show-forced-updates</dt>
838 <dd>
839 <p>By default, git checks if a branch is force-updated during
840 fetch. This can be disabled through fetch.showForcedUpdates, but
841 the --show-forced-updates option guarantees this check occurs.
842 See <a href="git-config.html">git-config(1)</a>.</p>
843 </dd>
844 <dt class="hdlist1">--no-show-forced-updates</dt>
845 <dd>
846 <p>By default, git checks if a branch is force-updated during
847 fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates
848 to false to skip this check for performance reasons. If used during
849 <em>git-pull</em> the --ff-only option will still check for forced updates
850 before attempting a fast-forward update. See <a href="git-config.html">git-config(1)</a>.</p>
851 </dd>
852 <dt class="hdlist1">-4</dt>
853 <dt class="hdlist1">--ipv4</dt>
854 <dd>
855 <p>Use IPv4 addresses only, ignoring IPv6 addresses.</p>
856 </dd>
857 <dt class="hdlist1">-6</dt>
858 <dt class="hdlist1">--ipv6</dt>
859 <dd>
860 <p>Use IPv6 addresses only, ignoring IPv4 addresses.</p>
861 </dd>
862 <dt class="hdlist1">&lt;repository&gt;</dt>
863 <dd>
864 <p>The "remote" repository that is the source of a fetch
865 or pull operation. This parameter can be either a URL
866 (see the section <a href="#URLS">GIT URLS</a> below) or the name
867 of a remote (see the section <a href="#REMOTES">REMOTES</a> below).</p>
868 </dd>
869 <dt class="hdlist1">&lt;group&gt;</dt>
870 <dd>
871 <p>A name referring to a list of repositories as the value
872 of remotes.&lt;group&gt; in the configuration file.
873 (See <a href="git-config.html">git-config(1)</a>).</p>
874 </dd>
875 <dt class="hdlist1">&lt;refspec&gt;</dt>
876 <dd>
877 <p>Specifies which refs to fetch and which local refs to update.
878 When no &lt;refspec&gt;s appear on the command line, the refs to fetch
879 are read from <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> variables instead
880 (see <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> below).</p>
881 <div class="paragraph">
882 <p>The format of a &lt;refspec&gt; parameter is an optional plus
883 <code>+</code>, followed by the source &lt;src&gt;, followed
884 by a colon <code>:</code>, followed by the destination &lt;dst&gt;.
885 The colon can be omitted when &lt;dst&gt; is empty. &lt;src&gt; is
886 typically a ref, or a glob pattern with a single * that is used
887 to match a set of refs, but it can also be a fully spelled hex object
888 name.</p>
889 </div>
890 <div class="paragraph">
891 <p>A &lt;refspec&gt; may contain a * in its &lt;src&gt; to indicate a simple pattern
892 match. Such a refspec functions like a glob that matches any ref with the
893 pattern. A pattern &lt;refspec&gt; must have one and only one * in both the &lt;src&gt; and
894 &lt;dst&gt;. It will map refs to the destination by replacing the * with the
895 contents matched from the source.</p>
896 </div>
897 <div class="paragraph">
898 <p>If a refspec is prefixed by <code>^</code>, it will be interpreted as a negative
899 refspec. Rather than specifying which refs to fetch or which local refs to
900 update, such a refspec will instead specify refs to exclude. A ref will be
901 considered to match if it matches at least one positive refspec, and does
902 not match any negative refspec. Negative refspecs can be useful to restrict
903 the scope of a pattern refspec so that it will not include specific refs.
904 Negative refspecs can themselves be pattern refspecs. However, they may only
905 contain a &lt;src&gt; and do not specify a &lt;dst&gt;. Fully spelled out hex object
906 names are also not supported.</p>
907 </div>
908 <div class="paragraph">
909 <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>;
910 it requests fetching everything up to the given tag.</p>
911 </div>
912 <div class="paragraph">
913 <p>The remote ref that matches &lt;src&gt;
914 is fetched, and if &lt;dst&gt; is not an empty string, an attempt
915 is made to update the local ref that matches it.</p>
916 </div>
917 <div class="paragraph">
918 <p>Whether that update is allowed without <code>--force</code> depends on the ref
919 namespace it&#8217;s being fetched to, the type of object being fetched, and
920 whether the update is considered to be a fast-forward. Generally, the
921 same rules apply for fetching as when pushing, see the <em>&lt;refspec&gt;</em>...
922 section of <a href="git-push.html">git-push(1)</a> for what those are. Exceptions to those
923 rules particular to <em>git fetch</em> are noted below.</p>
924 </div>
925 <div class="paragraph">
926 <p>Until Git version 2.20, and unlike when pushing with
927 <a href="git-push.html">git-push(1)</a>, any updates to <code>refs/tags/</code>* would be accepted
928 without <code>+</code> in the refspec (or <code>--force</code>). When fetching, we promiscuously
929 considered all tag updates from a remote to be forced fetches. Since
930 Git version 2.20, fetching to update <code>refs/tags/</code>* works the same way
931 as when pushing. I.e. any updates will be rejected without <code>+</code> in the
932 refspec (or <code>--force</code>).</p>
933 </div>
934 <div class="paragraph">
935 <p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, any updates outside of
936 <code>refs/</code>{tags,heads}/* will be accepted without <code>+</code> in the refspec (or
937 <code>--force</code>), whether that&#8217;s swapping e.g. a tree object for a blob, or
938 a commit for another commit that doesn&#8217;t have the previous commit as
939 an ancestor etc.</p>
940 </div>
941 <div class="paragraph">
942 <p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, there is no
943 configuration which&#8217;ll amend these rules, and nothing like a
944 <code>pre-fetch</code> hook analogous to the <code>pre-receive</code> hook.</p>
945 </div>
946 <div class="paragraph">
947 <p>As with pushing with <a href="git-push.html">git-push(1)</a>, all of the rules described
948 above about what&#8217;s not allowed as an update can be overridden by
949 adding an optional leading <code>+</code> to a refspec (or using the <code>--force</code>
950 command line option). The only exception to this is that no amount of
951 forcing will make the <code>refs/heads/</code>* namespace accept a non-commit
952 object.</p>
953 </div>
954 <div class="admonitionblock note">
955 <table>
956 <tr>
957 <td class="icon">
958 <div class="title">Note</div>
959 </td>
960 <td class="content">
961 When the remote branch you want to fetch is known to
962 be rewound and rebased regularly, it is expected that
963 its new tip will not be a descendant of its previous tip
964 (as stored in your remote-tracking branch the last time
965 you fetched). You would want
966 to use the <code>+</code> sign to indicate non-fast-forward updates
967 will be needed for such branches. There is no way to
968 determine or declare that a branch will be made available
969 in a repository with this behavior; the pulling user simply
970 must know this is the expected usage pattern for a branch.
971 </td>
972 </tr>
973 </table>
974 </div>
975 </dd>
976 <dt class="hdlist1">--stdin</dt>
977 <dd>
978 <p>Read refspecs, one per line, from stdin in addition to those provided
979 as arguments. The "tag &lt;name&gt;" format is not supported.</p>
980 </dd>
981 </dl>
982 </div>
983 </div>
984 </div>
985 <div class="sect1">
986 <h2 id="_git_urls">GIT URLS<a id="URLS"></a></h2>
987 <div class="sectionbody">
988 <div class="paragraph">
989 <p>In general, URLs contain information about the transport protocol, the
990 address of the remote server, and the path to the repository.
991 Depending on the transport protocol, some of this information may be
992 absent.</p>
993 </div>
994 <div class="paragraph">
995 <p>Git supports ssh, git, http, and https protocols (in addition, ftp
996 and ftps can be used for fetching, but this is inefficient and
997 deprecated; do not use them).</p>
998 </div>
999 <div class="paragraph">
1000 <p>The native transport (i.e. <code>git://</code> URL) does no authentication and
1001 should be used with caution on unsecured networks.</p>
1002 </div>
1003 <div class="paragraph">
1004 <p>The following syntaxes may be used with them:</p>
1005 </div>
1006 <div class="ulist">
1007 <ul>
1008 <li>
1009 <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>
1010 </li>
1011 <li>
1012 <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>
1013 </li>
1014 <li>
1015 <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>
1016 </li>
1017 <li>
1018 <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>
1019 </li>
1020 </ul>
1021 </div>
1022 <div class="paragraph">
1023 <p>An alternative scp-like syntax may also be used with the ssh protocol:</p>
1024 </div>
1025 <div class="ulist">
1026 <ul>
1027 <li>
1028 <p>[<em>&lt;user&gt;</em><code>@</code>]<em>&lt;host&gt;</em><code>:/</code><em>&lt;path-to-git-repo&gt;</em></p>
1029 </li>
1030 </ul>
1031 </div>
1032 <div class="paragraph">
1033 <p>This syntax is only recognized if there are no slashes before the
1034 first colon. This helps differentiate a local path that contains a
1035 colon. For example the local path <code>foo:bar</code> could be specified as an
1036 absolute path or .<code>/foo:bar</code> to avoid being misinterpreted as an ssh
1037 url.</p>
1038 </div>
1039 <div class="paragraph">
1040 <p>The ssh and git protocols additionally support <code>~</code><em>&lt;username&gt;</em> expansion:</p>
1041 </div>
1042 <div class="ulist">
1043 <ul>
1044 <li>
1045 <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>
1046 </li>
1047 <li>
1048 <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>
1049 </li>
1050 <li>
1051 <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>
1052 </li>
1053 </ul>
1054 </div>
1055 <div class="paragraph">
1056 <p>For local repositories, also supported by Git natively, the following
1057 syntaxes may be used:</p>
1058 </div>
1059 <div class="ulist">
1060 <ul>
1061 <li>
1062 <p><code>/path/to/repo.git/</code></p>
1063 </li>
1064 <li>
1065 <p><code>file:///path/to/repo.git/</code></p>
1066 </li>
1067 </ul>
1068 </div>
1069 <div class="paragraph">
1070 <p>These two syntaxes are mostly equivalent, except when cloning, when
1071 the former implies <code>--local</code> option. See <a href="git-clone.html">git-clone(1)</a> for
1072 details.</p>
1073 </div>
1074 <div class="paragraph">
1075 <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
1076 accept a suitable bundle file. See <a href="git-bundle.html">git-bundle(1)</a>.</p>
1077 </div>
1078 <div class="paragraph">
1079 <p>When Git doesn&#8217;t know how to handle a certain transport protocol, it
1080 attempts to use the <code>remote-</code><em>&lt;transport&gt;</em> remote helper, if one
1081 exists. To explicitly request a remote helper, the following syntax
1082 may be used:</p>
1083 </div>
1084 <div class="ulist">
1085 <ul>
1086 <li>
1087 <p><em>&lt;transport&gt;</em><code>::</code><em>&lt;address&gt;</em></p>
1088 </li>
1089 </ul>
1090 </div>
1091 <div class="paragraph">
1092 <p>where <em>&lt;address&gt;</em> may be a path, a server and path, or an arbitrary
1093 URL-like string recognized by the specific remote helper being
1094 invoked. See <a href="gitremote-helpers.html">gitremote-helpers(7)</a> for details.</p>
1095 </div>
1096 <div class="paragraph">
1097 <p>If there are a large number of similarly-named remote repositories and
1098 you want to use a different format for them (such that the URLs you
1099 use will be rewritten into URLs that work), you can create a
1100 configuration section of the form:</p>
1101 </div>
1102 <div class="verseblock">
1103 <pre class="content"> [url "<em>&lt;actual-url-base&gt;</em>"]
1104 insteadOf = <em>&lt;other-url-base&gt;</em></pre>
1105 </div>
1106 <div class="paragraph">
1107 <p>For example, with this:</p>
1108 </div>
1109 <div class="listingblock">
1110 <div class="content">
1111 <pre> [url "git://git.host.xz/"]
1112 insteadOf = host.xz:/path/to/
1113 insteadOf = work:</pre>
1114 </div>
1115 </div>
1116 <div class="paragraph">
1117 <p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be
1118 rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p>
1119 </div>
1120 <div class="paragraph">
1121 <p>If you want to rewrite URLs for push only, you can create a
1122 configuration section of the form:</p>
1123 </div>
1124 <div class="verseblock">
1125 <pre class="content"> [url "<em>&lt;actual-url-base&gt;</em>"]
1126 pushInsteadOf = <em>&lt;other-url-base&gt;</em></pre>
1127 </div>
1128 <div class="paragraph">
1129 <p>For example, with this:</p>
1130 </div>
1131 <div class="listingblock">
1132 <div class="content">
1133 <pre> [url "ssh://example.org/"]
1134 pushInsteadOf = git://example.org/</pre>
1135 </div>
1136 </div>
1137 <div class="paragraph">
1138 <p>a URL like "git://example.org/path/to/repo.git" will be rewritten to
1139 "ssh://example.org/path/to/repo.git" for pushes, but pulls will still
1140 use the original URL.</p>
1141 </div>
1142 </div>
1143 </div>
1144 <div class="sect1">
1145 <h2 id="_remotes">REMOTES<a id="REMOTES"></a></h2>
1146 <div class="sectionbody">
1147 <div class="paragraph">
1148 <p>The name of one of the following can be used instead
1149 of a URL as <em>&lt;repository&gt;</em> argument:</p>
1150 </div>
1151 <div class="ulist">
1152 <ul>
1153 <li>
1154 <p>a remote in the Git configuration file: <code>$GIT_DIR/config</code>,</p>
1155 </li>
1156 <li>
1157 <p>a file in the <code>$GIT_DIR/remotes</code> directory, or</p>
1158 </li>
1159 <li>
1160 <p>a file in the <code>$GIT_DIR/branches</code> directory.</p>
1161 </li>
1162 </ul>
1163 </div>
1164 <div class="paragraph">
1165 <p>All of these also allow you to omit the refspec from the command line
1166 because they each contain a refspec which git will use by default.</p>
1167 </div>
1168 <div class="sect2">
1169 <h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3>
1170 <div class="paragraph">
1171 <p>You can choose to provide the name of a remote which you had previously
1172 configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a>
1173 or even by a manual edit to the <code>$GIT_DIR/config</code> file. The URL of
1174 this remote will be used to access the repository. The refspec
1175 of this remote will be used by default when you do
1176 not provide a refspec on the command line. The entry in the
1177 config file would appear like this:</p>
1178 </div>
1179 <div class="listingblock">
1180 <div class="content">
1181 <pre> [remote "&lt;name&gt;"]
1182 url = &lt;URL&gt;
1183 pushurl = &lt;pushurl&gt;
1184 push = &lt;refspec&gt;
1185 fetch = &lt;refspec&gt;</pre>
1186 </div>
1187 </div>
1188 <div class="paragraph">
1189 <p>The <em>&lt;pushurl&gt;</em> is used for pushes only. It is optional and defaults
1190 to <em>&lt;URL&gt;</em>. Pushing to a remote affects all defined pushurls or all
1191 defined urls if no pushurls are defined. Fetch, however, will only
1192 fetch from the first defined url if multiple urls are defined.</p>
1193 </div>
1194 </div>
1195 <div class="sect2">
1196 <h3 id="_named_file_in_git_dirremotes">Named file in <code>$GIT_DIR/remotes</code></h3>
1197 <div class="paragraph">
1198 <p>You can choose to provide the name of a
1199 file in <code>$GIT_DIR/remotes</code>. The URL
1200 in this file will be used to access the repository. The refspec
1201 in this file will be used as default when you do not
1202 provide a refspec on the command line. This file should have the
1203 following format:</p>
1204 </div>
1205 <div class="listingblock">
1206 <div class="content">
1207 <pre> URL: one of the above URL formats
1208 Push: &lt;refspec&gt;
1209 Pull: &lt;refspec&gt;</pre>
1210 </div>
1211 </div>
1212 <div class="paragraph">
1213 <p><code>Push:</code> lines are used by <em>git push</em> and
1214 <code>Pull:</code> lines are used by <em>git pull</em> and <em>git fetch</em>.
1215 Multiple <code>Push:</code> and <code>Pull:</code> lines may
1216 be specified for additional branch mappings.</p>
1217 </div>
1218 </div>
1219 <div class="sect2">
1220 <h3 id="_named_file_in_git_dirbranches">Named file in <code>$GIT_DIR/branches</code></h3>
1221 <div class="paragraph">
1222 <p>You can choose to provide the name of a
1223 file in <code>$GIT_DIR/branches</code>.
1224 The URL in this file will be used to access the repository.
1225 This file should have the following format:</p>
1226 </div>
1227 <div class="listingblock">
1228 <div class="content">
1229 <pre> &lt;URL&gt;#&lt;head&gt;</pre>
1230 </div>
1231 </div>
1232 <div class="paragraph">
1233 <p><em>&lt;URL&gt;</em> is required; #<em>&lt;head&gt;</em> is optional.</p>
1234 </div>
1235 <div class="paragraph">
1236 <p>Depending on the operation, git will use one of the following
1237 refspecs, if you don&#8217;t provide one on the command line.
1238 <em>&lt;branch&gt;</em> is the name of this file in <code>$GIT_DIR/branches</code> and
1239 <em>&lt;head&gt;</em> defaults to <code>master</code>.</p>
1240 </div>
1241 <div class="paragraph">
1242 <p>git fetch uses:</p>
1243 </div>
1244 <div class="listingblock">
1245 <div class="content">
1246 <pre> refs/heads/&lt;head&gt;:refs/heads/&lt;branch&gt;</pre>
1247 </div>
1248 </div>
1249 <div class="paragraph">
1250 <p>git push uses:</p>
1251 </div>
1252 <div class="listingblock">
1253 <div class="content">
1254 <pre> HEAD:refs/heads/&lt;head&gt;</pre>
1255 </div>
1256 </div>
1257 </div>
1258 </div>
1259 </div>
1260 <div class="sect1">
1261 <h2 id="_configured_remote_tracking_branches">CONFIGURED REMOTE-TRACKING BRANCHES<a id="CRTB"></a></h2>
1262 <div class="sectionbody">
1263 <div class="paragraph">
1264 <p>You often interact with the same remote repository by
1265 regularly and repeatedly fetching from it. In order to keep track
1266 of the progress of such a remote repository, <code>git</code> <code>fetch</code> allows you
1267 to configure <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> configuration variables.</p>
1268 </div>
1269 <div class="paragraph">
1270 <p>Typically such a variable may look like this:</p>
1271 </div>
1272 <div class="listingblock">
1273 <div class="content">
1274 <pre>[remote "origin"]
1275 fetch = +refs/heads/*:refs/remotes/origin/*</pre>
1276 </div>
1277 </div>
1278 <div class="paragraph">
1279 <p>This configuration is used in two ways:</p>
1280 </div>
1281 <div class="ulist">
1282 <ul>
1283 <li>
1284 <p>When <code>git</code> <code>fetch</code> is run without specifying what branches
1285 and/or tags to fetch on the command line, e.g. <code>git</code> <code>fetch</code> <code>origin</code>
1286 or <code>git</code> <code>fetch</code>, <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> values are used as
1287 the refspecs&#8212;&#8203;they specify which refs to fetch and which local refs
1288 to update. The example above will fetch
1289 all branches that exist in the <code>origin</code> (i.e. any ref that matches
1290 the left-hand side of the value, <code>refs/heads/</code>*) and update the
1291 corresponding remote-tracking branches in the <code>refs/remotes/origin/</code>*
1292 hierarchy.</p>
1293 </li>
1294 <li>
1295 <p>When <code>git</code> <code>fetch</code> is run with explicit branches and/or tags
1296 to fetch on the command line, e.g. <code>git</code> <code>fetch</code> <code>origin</code> <code>master</code>, the
1297 &lt;refspec&gt;s given on the command line determine what are to be
1298 fetched (e.g. <code>master</code> in the example,
1299 which is a short-hand for <code>master:</code>, which in turn means
1300 "fetch the <em>master</em> branch but I do not explicitly say what
1301 remote-tracking branch to update with it from the command line"),
1302 and the example command will
1303 fetch <em>only</em> the <em>master</em> branch. The <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code>
1304 values determine which
1305 remote-tracking branch, if any, is updated. When used in this
1306 way, the <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> values do not have any
1307 effect in deciding <em>what</em> gets fetched (i.e. the values are not
1308 used as refspecs when the command-line lists refspecs); they are
1309 only used to decide <em>where</em> the refs that are fetched are stored
1310 by acting as a mapping.</p>
1311 </li>
1312 </ul>
1313 </div>
1314 <div class="paragraph">
1315 <p>The latter use of the <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> values can be
1316 overridden by giving the <code>--refmap=</code><em>&lt;refspec&gt;</em> parameter(s) on the
1317 command line.</p>
1318 </div>
1319 </div>
1320 </div>
1321 <div class="sect1">
1322 <h2 id="_pruning">PRUNING</h2>
1323 <div class="sectionbody">
1324 <div class="paragraph">
1325 <p>Git has a default disposition of keeping data unless it&#8217;s explicitly
1326 thrown away; this extends to holding onto local references to branches
1327 on remotes that have themselves deleted those branches.</p>
1328 </div>
1329 <div class="paragraph">
1330 <p>If left to accumulate, these stale references might make performance
1331 worse on big and busy repos that have a lot of branch churn, and
1332 e.g. make the output of commands like <code>git</code> <code>branch</code> <code>-a</code> <code>--contains</code>
1333 <em>&lt;commit&gt;</em> needlessly verbose, as well as impacting anything else
1334 that&#8217;ll work with the complete set of known references.</p>
1335 </div>
1336 <div class="paragraph">
1337 <p>These remote-tracking references can be deleted as a one-off with
1338 either of:</p>
1339 </div>
1340 <div class="listingblock">
1341 <div class="content">
1342 <pre># While fetching
1343 $ git fetch --prune &lt;name&gt;
1345 # Only prune, don't fetch
1346 $ git remote prune &lt;name&gt;</pre>
1347 </div>
1348 </div>
1349 <div class="paragraph">
1350 <p>To prune references as part of your normal workflow without needing to
1351 remember to run that, set <code>fetch.prune</code> globally, or
1352 <code>remote.</code><em>&lt;name&gt;</em><code>.prune</code> per-remote in the config. See
1353 <a href="git-config.html">git-config(1)</a>.</p>
1354 </div>
1355 <div class="paragraph">
1356 <p>Here&#8217;s where things get tricky and more specific. The pruning feature
1357 doesn&#8217;t actually care about branches, instead it&#8217;ll prune local &#8592;&#8594;
1358 remote-references as a function of the refspec of the remote (see
1359 <em>&lt;refspec&gt;</em> and <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> above).</p>
1360 </div>
1361 <div class="paragraph">
1362 <p>Therefore if the refspec for the remote includes
1363 e.g. <code>refs/tags/</code>*:refs/tags/*, or you manually run e.g. <code>git</code> <code>fetch</code>
1364 <code>--prune</code> <em>&lt;name&gt;</em> "refs/tags/*:refs/tags/*" it won&#8217;t be stale remote
1365 tracking branches that are deleted, but any local tag that doesn&#8217;t
1366 exist on the remote.</p>
1367 </div>
1368 <div class="paragraph">
1369 <p>This might not be what you expect, i.e. you want to prune remote
1370 <em>&lt;name&gt;</em>, but also explicitly fetch tags from it, so when you fetch
1371 from it you delete all your local tags, most of which may not have
1372 come from the <em>&lt;name&gt;</em> remote in the first place.</p>
1373 </div>
1374 <div class="paragraph">
1375 <p>So be careful when using this with a refspec like
1376 <code>refs/tags/</code>*:refs/tags/*, or any other refspec which might map
1377 references from multiple remotes to the same local namespace.</p>
1378 </div>
1379 <div class="paragraph">
1380 <p>Since keeping up-to-date with both branches and tags on the remote is
1381 a common use-case the <code>--prune-tags</code> option can be supplied along with
1382 <code>--prune</code> to prune local tags that don&#8217;t exist on the remote, and
1383 force-update those tags that differ. Tag pruning can also be enabled
1384 with <code>fetch.pruneTags</code> or <code>remote.</code><em>&lt;name&gt;</em><code>.pruneTags</code> in the config. See
1385 <a href="git-config.html">git-config(1)</a>.</p>
1386 </div>
1387 <div class="paragraph">
1388 <p>The <code>--prune-tags</code> option is equivalent to having
1389 <code>refs/tags/</code>*:refs/tags/* declared in the refspecs of the remote. This
1390 can lead to some seemingly strange interactions:</p>
1391 </div>
1392 <div class="listingblock">
1393 <div class="content">
1394 <pre># These both fetch tags
1395 $ git fetch --no-tags origin 'refs/tags/*:refs/tags/*'
1396 $ git fetch --no-tags --prune-tags origin</pre>
1397 </div>
1398 </div>
1399 <div class="paragraph">
1400 <p>The reason it doesn&#8217;t error out when provided without <code>--prune</code> or its
1401 config versions is for flexibility of the configured versions, and to
1402 maintain a 1=1 mapping between what the command line flags do, and
1403 what the configuration versions do.</p>
1404 </div>
1405 <div class="paragraph">
1406 <p>It&#8217;s reasonable to e.g. configure <code>fetch.pruneTags=true</code> in
1407 <code>~/.gitconfig</code> to have tags pruned whenever <code>git</code> <code>fetch</code> <code>--prune</code> is
1408 run, without making every invocation of <code>git</code> <code>fetch</code> without <code>--prune</code>
1409 an error.</p>
1410 </div>
1411 <div class="paragraph">
1412 <p>Pruning tags with <code>--prune-tags</code> also works when fetching a URL
1413 instead of a named remote. These will all prune tags not found on
1414 origin:</p>
1415 </div>
1416 <div class="listingblock">
1417 <div class="content">
1418 <pre>$ git fetch origin --prune --prune-tags
1419 $ git fetch origin --prune 'refs/tags/*:refs/tags/*'
1420 $ git fetch &lt;url-of-origin&gt; --prune --prune-tags
1421 $ git fetch &lt;url-of-origin&gt; --prune 'refs/tags/*:refs/tags/*'</pre>
1422 </div>
1423 </div>
1424 </div>
1425 </div>
1426 <div class="sect1">
1427 <h2 id="_output">OUTPUT</h2>
1428 <div class="sectionbody">
1429 <div class="paragraph">
1430 <p>The output of "git fetch" depends on the transport method used; this
1431 section describes the output when fetching over the Git protocol
1432 (either locally or via ssh) and Smart HTTP protocol.</p>
1433 </div>
1434 <div class="paragraph">
1435 <p>The status of the fetch is output in tabular form, with each line
1436 representing the status of a single ref. Each line is of the form:</p>
1437 </div>
1438 <div class="listingblock">
1439 <div class="content">
1440 <pre> &lt;flag&gt; &lt;summary&gt; &lt;from&gt; -&gt; &lt;to&gt; [&lt;reason&gt;]</pre>
1441 </div>
1442 </div>
1443 <div class="paragraph">
1444 <p>When using <code>--porcelain</code>, the output format is intended to be
1445 machine-parseable. In contrast to the human-readable output formats it
1446 thus prints to standard output instead of standard error. Each line is
1447 of the form:</p>
1448 </div>
1449 <div class="listingblock">
1450 <div class="content">
1451 <pre>&lt;flag&gt; &lt;old-object-id&gt; &lt;new-object-id&gt; &lt;local-reference&gt;</pre>
1452 </div>
1453 </div>
1454 <div class="paragraph">
1455 <p>The status of up-to-date refs is shown only if the --verbose option is
1456 used.</p>
1457 </div>
1458 <div class="paragraph">
1459 <p>In compact output mode, specified with configuration variable
1460 fetch.output, if either entire <em>&lt;from&gt;</em> or <em>&lt;to&gt;</em> is found in the
1461 other string, it will be substituted with * in the other string. For
1462 example, <code>master</code> <code>-</code>&gt; <code>origin/master</code> becomes <code>master</code> <code>-</code>&gt; <code>origin/</code>*.</p>
1463 </div>
1464 <div class="dlist">
1465 <dl>
1466 <dt class="hdlist1">flag</dt>
1467 <dd>
1468 <p>A single character indicating the status of the ref:</p>
1469 <div class="dlist">
1470 <dl>
1471 <dt class="hdlist1">(space)</dt>
1472 <dd>
1473 <p>for a successfully fetched fast-forward;</p>
1474 </dd>
1475 <dt class="hdlist1"><code>+</code></dt>
1476 <dd>
1477 <p>for a successful forced update;</p>
1478 </dd>
1479 <dt class="hdlist1"><code>-</code></dt>
1480 <dd>
1481 <p>for a successfully pruned ref;</p>
1482 </dd>
1483 <dt class="hdlist1"><code>t</code></dt>
1484 <dd>
1485 <p>for a successful tag update;</p>
1486 </dd>
1487 <dt class="hdlist1">*</dt>
1488 <dd>
1489 <p>for a successfully fetched new ref;</p>
1490 </dd>
1491 <dt class="hdlist1">!</dt>
1492 <dd>
1493 <p>for a ref that was rejected or failed to update; and</p>
1494 </dd>
1495 <dt class="hdlist1"><code>=</code></dt>
1496 <dd>
1497 <p>for a ref that was up to date and did not need fetching.</p>
1498 </dd>
1499 </dl>
1500 </div>
1501 </dd>
1502 <dt class="hdlist1">summary</dt>
1503 <dd>
1504 <p>For a successfully fetched ref, the summary shows the old and new
1505 values of the ref in a form suitable for using as an argument to
1506 <code>git</code> <code>log</code> (this is <em>&lt;old&gt;</em><code>..</code><em>&lt;new&gt;</em> in most cases, and
1507 <em>&lt;old&gt;</em><code>...</code><em>&lt;new&gt;</em> for forced non-fast-forward updates).</p>
1508 </dd>
1509 <dt class="hdlist1">from</dt>
1510 <dd>
1511 <p>The name of the remote ref being fetched from, minus its
1512 <code>refs/</code><em>&lt;type&gt;</em><code>/</code> prefix. In the case of deletion, the name of
1513 the remote ref is "(none)".</p>
1514 </dd>
1515 <dt class="hdlist1">to</dt>
1516 <dd>
1517 <p>The name of the local ref being updated, minus its
1518 <code>refs/</code><em>&lt;type&gt;</em><code>/</code> prefix.</p>
1519 </dd>
1520 <dt class="hdlist1">reason</dt>
1521 <dd>
1522 <p>A human-readable explanation. In the case of successfully fetched
1523 refs, no explanation is needed. For a failed ref, the reason for
1524 failure is described.</p>
1525 </dd>
1526 </dl>
1527 </div>
1528 </div>
1529 </div>
1530 <div class="sect1">
1531 <h2 id="_examples">EXAMPLES</h2>
1532 <div class="sectionbody">
1533 <div class="ulist">
1534 <ul>
1535 <li>
1536 <p>Update the remote-tracking branches:</p>
1537 <div class="listingblock">
1538 <div class="content">
1539 <pre>$ git fetch origin</pre>
1540 </div>
1541 </div>
1542 <div class="paragraph">
1543 <p>The above command copies all branches from the remote <code>refs/heads/</code>
1544 namespace and stores them to the local <code>refs/remotes/origin/</code> namespace,
1545 unless the <code>remote.</code><em>&lt;repository&gt;</em><code>.fetch</code> option is used to specify a
1546 non-default refspec.</p>
1547 </div>
1548 </li>
1549 <li>
1550 <p>Using refspecs explicitly:</p>
1551 <div class="listingblock">
1552 <div class="content">
1553 <pre>$ git fetch origin +seen:seen maint:tmp</pre>
1554 </div>
1555 </div>
1556 <div class="paragraph">
1557 <p>This updates (or creates, as necessary) branches <code>seen</code> and <code>tmp</code> in
1558 the local repository by fetching from the branches (respectively)
1559 <code>seen</code> and <code>maint</code> from the remote repository.</p>
1560 </div>
1561 <div class="paragraph">
1562 <p>The <code>seen</code> branch will be updated even if it does not fast-forward,
1563 because it is prefixed with a plus sign; <code>tmp</code> will not be.</p>
1564 </div>
1565 </li>
1566 <li>
1567 <p>Peek at a remote&#8217;s branch, without configuring the remote in your local
1568 repository:</p>
1569 <div class="listingblock">
1570 <div class="content">
1571 <pre>$ git fetch git://git.kernel.org/pub/scm/git/git.git maint
1572 $ git log FETCH_HEAD</pre>
1573 </div>
1574 </div>
1575 <div class="paragraph">
1576 <p>The first command fetches the <code>maint</code> branch from the repository at
1577 <code>git://git.kernel.org/pub/scm/git/git.git</code> and the second command uses
1578 <code>FETCH_HEAD</code> to examine the branch with <a href="git-log.html">git-log(1)</a>. The fetched
1579 objects will eventually be removed by git&#8217;s built-in housekeeping (see
1580 <a href="git-gc.html">git-gc(1)</a>).</p>
1581 </div>
1582 </li>
1583 </ul>
1584 </div>
1585 </div>
1586 </div>
1587 <div class="sect1">
1588 <h2 id="_security">SECURITY</h2>
1589 <div class="sectionbody">
1590 <div class="paragraph">
1591 <p>The fetch and push protocols are not designed to prevent one side from
1592 stealing data from the other repository that was not intended to be
1593 shared. If you have private data that you need to protect from a malicious
1594 peer, your best option is to store it in another repository. This applies
1595 to both clients and servers. In particular, namespaces on a server are not
1596 effective for read access control; you should only grant read access to a
1597 namespace to clients that you would trust with read access to the entire
1598 repository.</p>
1599 </div>
1600 <div class="paragraph">
1601 <p>The known attack vectors are as follows:</p>
1602 </div>
1603 <div class="olist arabic">
1604 <ol class="arabic">
1605 <li>
1606 <p>The victim sends "have" lines advertising the IDs of objects it has that
1607 are not explicitly intended to be shared but can be used to optimize the
1608 transfer if the peer also has them. The attacker chooses an object ID X
1609 to steal and sends a ref to X, but isn&#8217;t required to send the content of
1610 X because the victim already has it. Now the victim believes that the
1611 attacker has X, and it sends the content of X back to the attacker
1612 later. (This attack is most straightforward for a client to perform on a
1613 server, by creating a ref to X in the namespace the client has access
1614 to and then fetching it. The most likely way for a server to perform it
1615 on a client is to "merge" X into a public branch and hope that the user
1616 does additional work on this branch and pushes it back to the server
1617 without noticing the merge.)</p>
1618 </li>
1619 <li>
1620 <p>As in #1, the attacker chooses an object ID X to steal. The victim sends
1621 an object Y that the attacker already has, and the attacker falsely
1622 claims to have X and not Y, so the victim sends Y as a delta against X.
1623 The delta reveals regions of X that are similar to Y to the attacker.</p>
1624 </li>
1625 </ol>
1626 </div>
1627 </div>
1628 </div>
1629 <div class="sect1">
1630 <h2 id="_configuration">CONFIGURATION</h2>
1631 <div class="sectionbody">
1632 <div class="paragraph">
1633 <p>Everything below this line in this section is selectively included
1634 from the <a href="git-config.html">git-config(1)</a> documentation. The content is the same
1635 as what&#8217;s found there:</p>
1636 </div>
1637 <div class="dlist">
1638 <dl>
1639 <dt class="hdlist1">fetch.recurseSubmodules</dt>
1640 <dd>
1641 <p>This option controls whether <code>git</code> <code>fetch</code> (and the underlying fetch
1642 in <code>git</code> <code>pull</code>) will recursively fetch into populated submodules.
1643 This option can be set either to a boolean value or to <em>on-demand</em>.
1644 Setting it to a boolean changes the behavior of fetch and pull to
1645 recurse unconditionally into submodules when set to true or to not
1646 recurse at all when set to false. When set to <em>on-demand</em>, fetch and
1647 pull will only recurse into a populated submodule when its
1648 superproject retrieves a commit that updates the submodule&#8217;s
1649 reference.
1650 Defaults to <em>on-demand</em>, or to the value of <em>submodule.recurse</em> if set.</p>
1651 </dd>
1652 <dt class="hdlist1">fetch.fsckObjects</dt>
1653 <dd>
1654 <p>If it is set to true, git-fetch-pack will check all fetched
1655 objects. See <code>transfer.fsckObjects</code> for what&#8217;s
1656 checked. Defaults to false. If not set, the value of
1657 <code>transfer.fsckObjects</code> is used instead.</p>
1658 </dd>
1659 <dt class="hdlist1">fetch.fsck.&lt;msg-id&gt;</dt>
1660 <dd>
1661 <p>Acts like <code>fsck.</code><em>&lt;msg-id&gt;</em>, but is used by
1662 <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See
1663 the <code>fsck.</code><em>&lt;msg-id&gt;</em> documentation for details.</p>
1664 </dd>
1665 <dt class="hdlist1">fetch.fsck.skipList</dt>
1666 <dd>
1667 <p>Acts like <code>fsck.skipList</code>, but is used by
1668 <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See
1669 the <code>fsck.skipList</code> documentation for details.</p>
1670 </dd>
1671 <dt class="hdlist1">fetch.unpackLimit</dt>
1672 <dd>
1673 <p>If the number of objects fetched over the Git native
1674 transfer is below this
1675 limit, then the objects will be unpacked into loose object
1676 files. However if the number of received objects equals or
1677 exceeds this limit then the received pack will be stored as
1678 a pack, after adding any missing delta bases. Storing the
1679 pack from a push can make the push operation complete faster,
1680 especially on slow filesystems. If not set, the value of
1681 <code>transfer.unpackLimit</code> is used instead.</p>
1682 </dd>
1683 <dt class="hdlist1">fetch.prune</dt>
1684 <dd>
1685 <p>If true, fetch will automatically behave as if the <code>--prune</code>
1686 option was given on the command line. See also <code>remote.</code><em>&lt;name&gt;</em><code>.prune</code>
1687 and the PRUNING section of <a href="git-fetch.html">git-fetch(1)</a>.</p>
1688 </dd>
1689 <dt class="hdlist1">fetch.pruneTags</dt>
1690 <dd>
1691 <p>If true, fetch will automatically behave as if the
1692 <code>refs/tags/</code>*:refs/tags/* refspec was provided when pruning,
1693 if not set already. This allows for setting both this option
1694 and <code>fetch.prune</code> to maintain a 1=1 mapping to upstream
1695 refs. See also <code>remote.</code><em>&lt;name&gt;</em><code>.pruneTags</code> and the PRUNING
1696 section of <a href="git-fetch.html">git-fetch(1)</a>.</p>
1697 </dd>
1698 <dt class="hdlist1">fetch.all</dt>
1699 <dd>
1700 <p>If true, fetch will attempt to update all available remotes.
1701 This behavior can be overridden by passing <code>--no-all</code> or by
1702 explicitly specifying one or more remote(s) to fetch from.
1703 Defaults to false.</p>
1704 </dd>
1705 <dt class="hdlist1">fetch.output</dt>
1706 <dd>
1707 <p>Control how ref update status is printed. Valid values are
1708 <code>full</code> and <code>compact</code>. Default value is <code>full</code>. See the
1709 OUTPUT section in <a href="git-fetch.html">git-fetch(1)</a> for details.</p>
1710 </dd>
1711 <dt class="hdlist1">fetch.negotiationAlgorithm</dt>
1712 <dd>
1713 <p>Control how information about the commits in the local repository
1714 is sent when negotiating the contents of the packfile to be sent by
1715 the server. Set to "consecutive" to use an algorithm that walks
1716 over consecutive commits checking each one. Set to "skipping" to
1717 use an algorithm that skips commits in an effort to converge
1718 faster, but may result in a larger-than-necessary packfile; or set
1719 to "noop" to not send any information at all, which will almost
1720 certainly result in a larger-than-necessary packfile, but will skip
1721 the negotiation step. Set to "default" to override settings made
1722 previously and use the default behaviour. The default is normally
1723 "consecutive", but if <code>feature.experimental</code> is true, then the
1724 default is "skipping". Unknown values will cause <em>git fetch</em> to
1725 error out.</p>
1726 <div class="paragraph">
1727 <p>See also the <code>--negotiate-only</code> and <code>--negotiation-tip</code> options to
1728 <a href="git-fetch.html">git-fetch(1)</a>.</p>
1729 </div>
1730 </dd>
1731 <dt class="hdlist1">fetch.showForcedUpdates</dt>
1732 <dd>
1733 <p>Set to false to enable <code>--no-show-forced-updates</code> in
1734 <a href="git-fetch.html">git-fetch(1)</a> and <a href="git-pull.html">git-pull(1)</a> commands.
1735 Defaults to true.</p>
1736 </dd>
1737 <dt class="hdlist1">fetch.parallel</dt>
1738 <dd>
1739 <p>Specifies the maximal number of fetch operations to be run in parallel
1740 at a time (submodules, or remotes when the <code>--multiple</code> option of
1741 <a href="git-fetch.html">git-fetch(1)</a> is in effect).</p>
1742 <div class="paragraph">
1743 <p>A value of 0 will give some reasonable default. If unset, it defaults to 1.</p>
1744 </div>
1745 <div class="paragraph">
1746 <p>For submodules, this setting can be overridden using the <code>submodule.fetchJobs</code>
1747 config setting.</p>
1748 </div>
1749 </dd>
1750 <dt class="hdlist1">fetch.writeCommitGraph</dt>
1751 <dd>
1752 <p>Set to true to write a commit-graph after every <code>git</code> <code>fetch</code> command
1753 that downloads a pack-file from a remote. Using the <code>--split</code> option,
1754 most executions will create a very small commit-graph file on top of
1755 the existing commit-graph file(s). Occasionally, these files will
1756 merge and the write may take longer. Having an updated commit-graph
1757 file helps performance of many Git commands, including <code>git</code> <code>merge-base</code>,
1758 <code>git</code> <code>push</code> <code>-f</code>, and <code>git</code> <code>log</code> <code>--graph</code>. Defaults to false.</p>
1759 </dd>
1760 <dt class="hdlist1">fetch.bundleURI</dt>
1761 <dd>
1762 <p>This value stores a URI for downloading Git object data from a bundle
1763 URI before performing an incremental fetch from the origin Git server.
1764 This is similar to how the <code>--bundle-uri</code> option behaves in
1765 <a href="git-clone.html">git-clone(1)</a>. <code>git</code> <code>clone</code> <code>--bundle-uri</code> will set the
1766 <code>fetch.bundleURI</code> value if the supplied bundle URI contains a bundle
1767 list that is organized for incremental fetches.</p>
1768 <div class="paragraph">
1769 <p>If you modify this value and your repository has a <code>fetch.bundleCreationToken</code>
1770 value, then remove that <code>fetch.bundleCreationToken</code> value before fetching from
1771 the new bundle URI.</p>
1772 </div>
1773 </dd>
1774 <dt class="hdlist1">fetch.bundleCreationToken</dt>
1775 <dd>
1776 <p>When using <code>fetch.bundleURI</code> to fetch incrementally from a bundle
1777 list that uses the "creationToken" heuristic, this config value
1778 stores the maximum <code>creationToken</code> value of the downloaded bundles.
1779 This value is used to prevent downloading bundles in the future
1780 if the advertised <code>creationToken</code> is not strictly larger than this
1781 value.</p>
1782 <div class="paragraph">
1783 <p>The creation token values are chosen by the provider serving the specific
1784 bundle URI. If you modify the URI at <code>fetch.bundleURI</code>, then be sure to
1785 remove the value for the <code>fetch.bundleCreationToken</code> value before fetching.</p>
1786 </div>
1787 </dd>
1788 </dl>
1789 </div>
1790 </div>
1791 </div>
1792 <div class="sect1">
1793 <h2 id="_bugs">BUGS</h2>
1794 <div class="sectionbody">
1795 <div class="paragraph">
1796 <p>Using --recurse-submodules can only fetch new commits in submodules that are
1797 present locally e.g. in <code>$GIT_DIR/modules/</code>. If the upstream adds a new
1798 submodule, that submodule cannot be fetched until it is cloned e.g. by <code>git</code>
1799 <code>submodule</code> <code>update</code>. This is expected to be fixed in a future Git version.</p>
1800 </div>
1801 </div>
1802 </div>
1803 <div class="sect1">
1804 <h2 id="_see_also">SEE ALSO</h2>
1805 <div class="sectionbody">
1806 <div class="paragraph">
1807 <p><a href="git-pull.html">git-pull(1)</a></p>
1808 </div>
1809 </div>
1810 </div>
1811 <div class="sect1">
1812 <h2 id="_git">GIT</h2>
1813 <div class="sectionbody">
1814 <div class="paragraph">
1815 <p>Part of the <a href="git.html">git(1)</a> suite</p>
1816 </div>
1817 </div>
1818 </div>
1819 </div>
1820 <div id="footer">
1821 <div id="footer-text">
1822 Last updated 2024-02-08 15:45:59 -0800
1823 </div>
1824 </div>
1825 </body>
1826 </html>