Junio C Hamano | b9d9d90 | 2018-05-23 07:07:42 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 3 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 4 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 5 | <head> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 6 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
Junio C Hamano | a85030a | 2022-07-27 16:48:21 | [diff] [blame] | 7 | <meta name="generator" content="AsciiDoc 10.2.0" /> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 8 | <title>git-fetch(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 9 | <style type="text/css"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 10 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 11 | |
| 12 | /* Default font. */ |
| 13 | body { |
| 14 | font-family: Georgia,serif; |
| 15 | } |
| 16 | |
| 17 | /* Title font. */ |
| 18 | h1, h2, h3, h4, h5, h6, |
| 19 | div.title, caption.title, |
| 20 | thead, p.table.header, |
| 21 | #toctitle, |
| 22 | #author, #revnumber, #revdate, #revremark, |
| 23 | #footer { |
| 24 | font-family: Arial,Helvetica,sans-serif; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | body { |
| 28 | margin: 1em 5% 1em 5%; |
| 29 | } |
| 30 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 31 | a { |
| 32 | color: blue; |
| 33 | text-decoration: underline; |
| 34 | } |
| 35 | a:visited { |
| 36 | color: fuchsia; |
| 37 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 38 | |
| 39 | em { |
| 40 | font-style: italic; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 41 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | strong { |
| 45 | font-weight: bold; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 46 | color: #083194; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 47 | } |
| 48 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 49 | h1, h2, h3, h4, h5, h6 { |
| 50 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 51 | margin-top: 1.2em; |
| 52 | margin-bottom: 0.5em; |
| 53 | line-height: 1.3; |
| 54 | } |
| 55 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 56 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 57 | border-bottom: 2px solid silver; |
| 58 | } |
| 59 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 60 | padding-top: 0.5em; |
| 61 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 62 | h3 { |
| 63 | float: left; |
| 64 | } |
| 65 | h3 + * { |
| 66 | clear: left; |
| 67 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 68 | h5 { |
| 69 | font-size: 1.0em; |
| 70 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 71 | |
| 72 | div.sectionbody { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 73 | margin-left: 0; |
| 74 | } |
| 75 | |
| 76 | hr { |
| 77 | border: 1px solid silver; |
| 78 | } |
| 79 | |
| 80 | p { |
| 81 | margin-top: 0.5em; |
| 82 | margin-bottom: 0.5em; |
| 83 | } |
| 84 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 85 | ul, ol, li > p { |
| 86 | margin-top: 0; |
| 87 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 88 | ul > li { color: #aaa; } |
| 89 | ul > li > * { color: black; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 90 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 91 | .monospaced, code, pre { |
| 92 | font-family: "Courier New", Courier, monospace; |
| 93 | font-size: inherit; |
| 94 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 95 | padding: 0; |
| 96 | margin: 0; |
| 97 | } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 98 | pre { |
| 99 | white-space: pre-wrap; |
| 100 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 101 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 102 | #author { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 103 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 104 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 105 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 106 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 107 | #email { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 108 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 109 | #revnumber, #revdate, #revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 110 | } |
| 111 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 112 | #footer { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 113 | font-size: small; |
| 114 | border-top: 2px solid silver; |
| 115 | padding-top: 0.5em; |
| 116 | margin-top: 4.0em; |
| 117 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 118 | #footer-text { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 119 | float: left; |
| 120 | padding-bottom: 0.5em; |
| 121 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 122 | #footer-badges { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 123 | float: right; |
| 124 | padding-bottom: 0.5em; |
| 125 | } |
| 126 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 127 | #preamble { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 128 | margin-top: 1.5em; |
| 129 | margin-bottom: 1.5em; |
| 130 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 131 | div.imageblock, div.exampleblock, div.verseblock, |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 132 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 133 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 134 | margin-top: 1.0em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 135 | margin-bottom: 1.5em; |
| 136 | } |
| 137 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 138 | margin-top: 2.0em; |
| 139 | margin-bottom: 2.0em; |
| 140 | margin-right: 10%; |
| 141 | color: #606060; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | div.content { /* Block element content. */ |
| 145 | padding: 0; |
| 146 | } |
| 147 | |
| 148 | /* Block element titles. */ |
| 149 | div.title, caption.title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 150 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 151 | font-weight: bold; |
| 152 | text-align: left; |
| 153 | margin-top: 1.0em; |
| 154 | margin-bottom: 0.5em; |
| 155 | } |
| 156 | div.title + * { |
| 157 | margin-top: 0; |
| 158 | } |
| 159 | |
| 160 | td div.title:first-child { |
| 161 | margin-top: 0.0em; |
| 162 | } |
| 163 | div.content div.title:first-child { |
| 164 | margin-top: 0.0em; |
| 165 | } |
| 166 | div.content + div.title { |
| 167 | margin-top: 0.0em; |
| 168 | } |
| 169 | |
| 170 | div.sidebarblock > div.content { |
| 171 | background: #ffffee; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 172 | border: 1px solid #dddddd; |
| 173 | border-left: 4px solid #f0f0f0; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 174 | padding: 0.5em; |
| 175 | } |
| 176 | |
| 177 | div.listingblock > div.content { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 178 | border: 1px solid #dddddd; |
| 179 | border-left: 5px solid #f0f0f0; |
| 180 | background: #f8f8f8; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 181 | padding: 0.5em; |
| 182 | } |
| 183 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 184 | div.quoteblock, div.verseblock { |
| 185 | padding-left: 1.0em; |
| 186 | margin-left: 1.0em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 187 | margin-right: 10%; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 188 | border-left: 5px solid #f0f0f0; |
| 189 | color: #888; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 190 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 191 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 192 | div.quoteblock > div.attribution { |
| 193 | padding-top: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 194 | text-align: right; |
| 195 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 196 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 197 | div.verseblock > pre.content { |
| 198 | font-family: inherit; |
| 199 | font-size: inherit; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 200 | } |
| 201 | div.verseblock > div.attribution { |
| 202 | padding-top: 0.75em; |
| 203 | text-align: left; |
| 204 | } |
| 205 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 206 | div.verseblock + div.attribution { |
| 207 | text-align: left; |
| 208 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 209 | |
| 210 | div.admonitionblock .icon { |
| 211 | vertical-align: top; |
| 212 | font-size: 1.1em; |
| 213 | font-weight: bold; |
| 214 | text-decoration: underline; |
| 215 | color: #527bbd; |
| 216 | padding-right: 0.5em; |
| 217 | } |
| 218 | div.admonitionblock td.content { |
| 219 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 220 | border-left: 3px solid #dddddd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 224 | border-left: 3px solid #dddddd; |
| 225 | padding-left: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 226 | } |
| 227 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 228 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 229 | span.image img { border-style: none; vertical-align: text-bottom; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 230 | a.image:visited { color: white; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 231 | |
| 232 | dl { |
| 233 | margin-top: 0.8em; |
| 234 | margin-bottom: 0.8em; |
| 235 | } |
| 236 | dt { |
| 237 | margin-top: 0.5em; |
| 238 | margin-bottom: 0; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 239 | font-style: normal; |
| 240 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 241 | } |
| 242 | dd > *:first-child { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 243 | margin-top: 0.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 244 | } |
| 245 | |
| 246 | ul, ol { |
| 247 | list-style-position: outside; |
| 248 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 249 | ol.arabic { |
| 250 | list-style-type: decimal; |
| 251 | } |
| 252 | ol.loweralpha { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 253 | list-style-type: lower-alpha; |
| 254 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 255 | ol.upperalpha { |
| 256 | list-style-type: upper-alpha; |
| 257 | } |
| 258 | ol.lowerroman { |
| 259 | list-style-type: lower-roman; |
| 260 | } |
| 261 | ol.upperroman { |
| 262 | list-style-type: upper-roman; |
| 263 | } |
| 264 | |
| 265 | div.compact ul, div.compact ol, |
| 266 | div.compact p, div.compact p, |
| 267 | div.compact div, div.compact div { |
| 268 | margin-top: 0.1em; |
| 269 | margin-bottom: 0.1em; |
| 270 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 271 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 272 | tfoot { |
| 273 | font-weight: bold; |
| 274 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 275 | td > div.verse { |
| 276 | white-space: pre; |
| 277 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 278 | |
| 279 | div.hdlist { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 280 | margin-top: 0.8em; |
| 281 | margin-bottom: 0.8em; |
| 282 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 283 | div.hdlist tr { |
| 284 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 285 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 286 | dt.hdlist1.strong, td.hdlist1.strong { |
| 287 | font-weight: bold; |
| 288 | } |
| 289 | td.hdlist1 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 290 | vertical-align: top; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 291 | font-style: normal; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 292 | padding-right: 0.8em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 293 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 294 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 295 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 296 | vertical-align: top; |
| 297 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 298 | div.hdlist.compact tr { |
| 299 | margin: 0; |
| 300 | padding-bottom: 0; |
| 301 | } |
| 302 | |
| 303 | .comment { |
| 304 | background: yellow; |
| 305 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 306 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 307 | .footnote, .footnoteref { |
| 308 | font-size: 0.8em; |
| 309 | } |
| 310 | |
| 311 | span.footnote, span.footnoteref { |
| 312 | vertical-align: super; |
| 313 | } |
| 314 | |
| 315 | #footnotes { |
| 316 | margin: 20px 0 20px 0; |
| 317 | padding: 7px 0 0 0; |
| 318 | } |
| 319 | |
| 320 | #footnotes div.footnote { |
| 321 | margin: 0 0 5px 0; |
| 322 | } |
| 323 | |
| 324 | #footnotes hr { |
| 325 | border: none; |
| 326 | border-top: 1px solid silver; |
| 327 | height: 1px; |
| 328 | text-align: left; |
| 329 | margin-left: 0; |
| 330 | width: 20%; |
| 331 | min-width: 100px; |
| 332 | } |
| 333 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 334 | div.colist td { |
| 335 | padding-right: 0.5em; |
| 336 | padding-bottom: 0.3em; |
| 337 | vertical-align: top; |
| 338 | } |
| 339 | div.colist td img { |
| 340 | margin-top: 0.3em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 341 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 342 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 343 | @media print { |
| 344 | #footer-badges { display: none; } |
| 345 | } |
| 346 | |
| 347 | #toc { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 348 | margin-bottom: 2.5em; |
| 349 | } |
| 350 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 351 | #toctitle { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 352 | color: #527bbd; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 353 | font-size: 1.1em; |
| 354 | font-weight: bold; |
| 355 | margin-top: 1.0em; |
| 356 | margin-bottom: 0.1em; |
| 357 | } |
| 358 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 359 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 360 | margin-top: 0; |
| 361 | margin-bottom: 0; |
| 362 | } |
| 363 | div.toclevel2 { |
| 364 | margin-left: 2em; |
| 365 | font-size: 0.9em; |
| 366 | } |
| 367 | div.toclevel3 { |
| 368 | margin-left: 4em; |
| 369 | font-size: 0.9em; |
| 370 | } |
| 371 | div.toclevel4 { |
| 372 | margin-left: 6em; |
| 373 | font-size: 0.9em; |
| 374 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 375 | |
| 376 | span.aqua { color: aqua; } |
| 377 | span.black { color: black; } |
| 378 | span.blue { color: blue; } |
| 379 | span.fuchsia { color: fuchsia; } |
| 380 | span.gray { color: gray; } |
| 381 | span.green { color: green; } |
| 382 | span.lime { color: lime; } |
| 383 | span.maroon { color: maroon; } |
| 384 | span.navy { color: navy; } |
| 385 | span.olive { color: olive; } |
| 386 | span.purple { color: purple; } |
| 387 | span.red { color: red; } |
| 388 | span.silver { color: silver; } |
| 389 | span.teal { color: teal; } |
| 390 | span.white { color: white; } |
| 391 | span.yellow { color: yellow; } |
| 392 | |
| 393 | span.aqua-background { background: aqua; } |
| 394 | span.black-background { background: black; } |
| 395 | span.blue-background { background: blue; } |
| 396 | span.fuchsia-background { background: fuchsia; } |
| 397 | span.gray-background { background: gray; } |
| 398 | span.green-background { background: green; } |
| 399 | span.lime-background { background: lime; } |
| 400 | span.maroon-background { background: maroon; } |
| 401 | span.navy-background { background: navy; } |
| 402 | span.olive-background { background: olive; } |
| 403 | span.purple-background { background: purple; } |
| 404 | span.red-background { background: red; } |
| 405 | span.silver-background { background: silver; } |
| 406 | span.teal-background { background: teal; } |
| 407 | span.white-background { background: white; } |
| 408 | span.yellow-background { background: yellow; } |
| 409 | |
| 410 | span.big { font-size: 2em; } |
| 411 | span.small { font-size: 0.6em; } |
| 412 | |
| 413 | span.underline { text-decoration: underline; } |
| 414 | span.overline { text-decoration: overline; } |
| 415 | span.line-through { text-decoration: line-through; } |
| 416 | |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 417 | div.unbreakable { page-break-inside: avoid; } |
| 418 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 419 | |
| 420 | /* |
| 421 | * xhtml11 specific |
| 422 | * |
| 423 | * */ |
| 424 | |
| 425 | div.tableblock { |
| 426 | margin-top: 1.0em; |
| 427 | margin-bottom: 1.5em; |
| 428 | } |
| 429 | div.tableblock > table { |
| 430 | border: 3px solid #527bbd; |
| 431 | } |
| 432 | thead, p.table.header { |
| 433 | font-weight: bold; |
| 434 | color: #527bbd; |
| 435 | } |
| 436 | p.table { |
| 437 | margin-top: 0; |
| 438 | } |
Junio C Hamano | 725b0da | 2020-01-22 22:02:40 | [diff] [blame] | 439 | /* Because the table frame attribute is overridden by CSS in most browsers. */ |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 440 | div.tableblock > table[frame="void"] { |
| 441 | border-style: none; |
| 442 | } |
| 443 | div.tableblock > table[frame="hsides"] { |
| 444 | border-left-style: none; |
| 445 | border-right-style: none; |
| 446 | } |
| 447 | div.tableblock > table[frame="vsides"] { |
| 448 | border-top-style: none; |
| 449 | border-bottom-style: none; |
| 450 | } |
| 451 | |
| 452 | |
| 453 | /* |
| 454 | * html5 specific |
| 455 | * |
| 456 | * */ |
| 457 | |
| 458 | table.tableblock { |
| 459 | margin-top: 1.0em; |
| 460 | margin-bottom: 1.5em; |
| 461 | } |
| 462 | thead, p.tableblock.header { |
| 463 | font-weight: bold; |
| 464 | color: #527bbd; |
| 465 | } |
| 466 | p.tableblock { |
| 467 | margin-top: 0; |
| 468 | } |
| 469 | table.tableblock { |
| 470 | border-width: 3px; |
| 471 | border-spacing: 0px; |
| 472 | border-style: solid; |
| 473 | border-color: #527bbd; |
| 474 | border-collapse: collapse; |
| 475 | } |
| 476 | th.tableblock, td.tableblock { |
| 477 | border-width: 1px; |
| 478 | padding: 4px; |
| 479 | border-style: solid; |
| 480 | border-color: #527bbd; |
| 481 | } |
| 482 | |
| 483 | table.tableblock.frame-topbot { |
| 484 | border-left-style: hidden; |
| 485 | border-right-style: hidden; |
| 486 | } |
| 487 | table.tableblock.frame-sides { |
| 488 | border-top-style: hidden; |
| 489 | border-bottom-style: hidden; |
| 490 | } |
| 491 | table.tableblock.frame-none { |
| 492 | border-style: hidden; |
| 493 | } |
| 494 | |
| 495 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 496 | text-align: left; |
| 497 | } |
| 498 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 499 | text-align: center; |
| 500 | } |
| 501 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 502 | text-align: right; |
| 503 | } |
| 504 | |
| 505 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 506 | vertical-align: top; |
| 507 | } |
| 508 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 509 | vertical-align: middle; |
| 510 | } |
| 511 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 512 | vertical-align: bottom; |
| 513 | } |
| 514 | |
| 515 | |
| 516 | /* |
| 517 | * manpage specific |
| 518 | * |
| 519 | * */ |
| 520 | |
| 521 | body.manpage h1 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 522 | padding-top: 0.5em; |
| 523 | padding-bottom: 0.5em; |
| 524 | border-top: 2px solid silver; |
| 525 | border-bottom: 2px solid silver; |
| 526 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 527 | body.manpage h2 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 528 | border-style: none; |
| 529 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 530 | body.manpage div.sectionbody { |
| 531 | margin-left: 3em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 532 | } |
| 533 | |
| 534 | @media print { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 535 | body.manpage div#toc { display: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 536 | } |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 537 | |
| 538 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 539 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 540 | <script type="text/javascript"> |
| 541 | /*<![CDATA[*/ |
Junio C Hamano | 2b15318 | 2021-12-15 21:00:31 | [diff] [blame] | 542 | var asciidoc = { // Namespace. |
| 543 | |
| 544 | ///////////////////////////////////////////////////////////////////// |
| 545 | // Table Of Contents generator |
| 546 | ///////////////////////////////////////////////////////////////////// |
| 547 | |
| 548 | /* Author: Mihai Bazon, September 2002 |
| 549 | * http://students.infoiasi.ro/~mishoo |
| 550 | * |
| 551 | * Table Of Content generator |
| 552 | * Version: 0.4 |
| 553 | * |
| 554 | * Feel free to use this script under the terms of the GNU General Public |
| 555 | * License, as long as you do not remove or alter this notice. |
| 556 | */ |
| 557 | |
| 558 | /* modified by Troy D. Hanson, September 2006. License: GPL */ |
| 559 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ |
| 560 | |
| 561 | // toclevels = 1..4. |
| 562 | toc: function (toclevels) { |
| 563 | |
| 564 | function getText(el) { |
| 565 | var text = ""; |
| 566 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 567 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. |
| 568 | text += i.data; |
| 569 | else if (i.firstChild != null) |
| 570 | text += getText(i); |
| 571 | } |
| 572 | return text; |
| 573 | } |
| 574 | |
| 575 | function TocEntry(el, text, toclevel) { |
| 576 | this.element = el; |
| 577 | this.text = text; |
| 578 | this.toclevel = toclevel; |
| 579 | } |
| 580 | |
| 581 | function tocEntries(el, toclevels) { |
| 582 | var result = new Array; |
| 583 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
| 584 | // Function that scans the DOM tree for header elements (the DOM2 |
| 585 | // nodeIterator API would be a better technique but not supported by all |
| 586 | // browsers). |
| 587 | var iterate = function (el) { |
| 588 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 589 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 590 | var mo = re.exec(i.tagName); |
| 591 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 592 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 593 | } |
| 594 | iterate(i); |
| 595 | } |
| 596 | } |
| 597 | } |
| 598 | iterate(el); |
| 599 | return result; |
| 600 | } |
| 601 | |
| 602 | var toc = document.getElementById("toc"); |
| 603 | if (!toc) { |
| 604 | return; |
| 605 | } |
| 606 | |
| 607 | // Delete existing TOC entries in case we're reloading the TOC. |
| 608 | var tocEntriesToRemove = []; |
| 609 | var i; |
| 610 | for (i = 0; i < toc.childNodes.length; i++) { |
| 611 | var entry = toc.childNodes[i]; |
| 612 | if (entry.nodeName.toLowerCase() == 'div' |
| 613 | && entry.getAttribute("class") |
| 614 | && entry.getAttribute("class").match(/^toclevel/)) |
| 615 | tocEntriesToRemove.push(entry); |
| 616 | } |
| 617 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 618 | toc.removeChild(tocEntriesToRemove[i]); |
| 619 | } |
| 620 | |
| 621 | // Rebuild TOC entries. |
| 622 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 623 | for (var i = 0; i < entries.length; ++i) { |
| 624 | var entry = entries[i]; |
| 625 | if (entry.element.id == "") |
| 626 | entry.element.id = "_toc_" + i; |
| 627 | var a = document.createElement("a"); |
| 628 | a.href = "#" + entry.element.id; |
| 629 | a.appendChild(document.createTextNode(entry.text)); |
| 630 | var div = document.createElement("div"); |
| 631 | div.appendChild(a); |
| 632 | div.className = "toclevel" + entry.toclevel; |
| 633 | toc.appendChild(div); |
| 634 | } |
| 635 | if (entries.length == 0) |
| 636 | toc.parentNode.removeChild(toc); |
| 637 | }, |
| 638 | |
| 639 | |
| 640 | ///////////////////////////////////////////////////////////////////// |
| 641 | // Footnotes generator |
| 642 | ///////////////////////////////////////////////////////////////////// |
| 643 | |
| 644 | /* Based on footnote generation code from: |
| 645 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 646 | */ |
| 647 | |
| 648 | footnotes: function () { |
| 649 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 650 | var i; |
| 651 | var noteholder = document.getElementById("footnotes"); |
| 652 | if (!noteholder) { |
| 653 | return; |
| 654 | } |
| 655 | var entriesToRemove = []; |
| 656 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 657 | var entry = noteholder.childNodes[i]; |
| 658 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
| 659 | entriesToRemove.push(entry); |
| 660 | } |
| 661 | for (i = 0; i < entriesToRemove.length; i++) { |
| 662 | noteholder.removeChild(entriesToRemove[i]); |
| 663 | } |
| 664 | |
| 665 | // Rebuild footnote entries. |
| 666 | var cont = document.getElementById("content"); |
| 667 | var spans = cont.getElementsByTagName("span"); |
| 668 | var refs = {}; |
| 669 | var n = 0; |
| 670 | for (i=0; i<spans.length; i++) { |
| 671 | if (spans[i].className == "footnote") { |
| 672 | n++; |
| 673 | var note = spans[i].getAttribute("data-note"); |
| 674 | if (!note) { |
| 675 | // Use [\s\S] in place of . so multi-line matches work. |
| 676 | // Because JavaScript has no s (dotall) regex flag. |
| 677 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 678 | spans[i].innerHTML = |
| 679 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 680 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 681 | spans[i].setAttribute("data-note", note); |
| 682 | } |
| 683 | noteholder.innerHTML += |
| 684 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 685 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 686 | n + "</a>. " + note + "</div>"; |
| 687 | var id =spans[i].getAttribute("id"); |
| 688 | if (id != null) refs["#"+id] = n; |
| 689 | } |
| 690 | } |
| 691 | if (n == 0) |
| 692 | noteholder.parentNode.removeChild(noteholder); |
| 693 | else { |
| 694 | // Process footnoterefs. |
| 695 | for (i=0; i<spans.length; i++) { |
| 696 | if (spans[i].className == "footnoteref") { |
| 697 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 698 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 699 | n = refs[href]; |
| 700 | spans[i].innerHTML = |
| 701 | "[<a href='#_footnote_" + n + |
| 702 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 703 | } |
| 704 | } |
| 705 | } |
| 706 | }, |
| 707 | |
| 708 | install: function(toclevels) { |
| 709 | var timerId; |
| 710 | |
| 711 | function reinstall() { |
| 712 | asciidoc.footnotes(); |
| 713 | if (toclevels) { |
| 714 | asciidoc.toc(toclevels); |
| 715 | } |
| 716 | } |
| 717 | |
| 718 | function reinstallAndRemoveTimer() { |
| 719 | clearInterval(timerId); |
| 720 | reinstall(); |
| 721 | } |
| 722 | |
| 723 | timerId = setInterval(reinstall, 500); |
| 724 | if (document.addEventListener) |
| 725 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 726 | else |
| 727 | window.onload = reinstallAndRemoveTimer; |
| 728 | } |
| 729 | |
| 730 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 731 | asciidoc.install(); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 732 | /*]]>*/ |
| 733 | </script> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 734 | </head> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 735 | <body class="manpage"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 736 | <div id="header"> |
| 737 | <h1> |
| 738 | git-fetch(1) Manual Page |
| 739 | </h1> |
| 740 | <h2>NAME</h2> |
| 741 | <div class="sectionbody"> |
| 742 | <p>git-fetch - |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 743 | Download objects and refs from another repository |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 744 | </p> |
| 745 | </div> |
| 746 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 747 | <div id="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 748 | <div class="sect1"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 749 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 750 | <div class="sectionbody"> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 751 | <div class="verseblock"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 752 | <pre class="content"><em>git fetch</em> [<options>] [<repository> [<refspec>…]] |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 753 | <em>git fetch</em> [<options>] <group> |
| 754 | <em>git fetch</em> --multiple [<options>] [(<repository> | <group>)…] |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 755 | <em>git fetch</em> --all [<options>]</pre> |
| 756 | <div class="attribution"> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 757 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 758 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 759 | </div> |
| 760 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 761 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 762 | <div class="sectionbody"> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 763 | <div class="paragraph"><p>Fetch branches and/or tags (collectively, "refs") from one or more |
| 764 | other repositories, along with the objects necessary to complete their |
| 765 | histories. Remote-tracking branches are updated (see the description |
| 766 | of <refspec> below for ways to control this behavior).</p></div> |
| 767 | <div class="paragraph"><p>By default, any tag that points into the histories being fetched is |
| 768 | also fetched; the effect is to fetch tags that |
Junio C Hamano | 4c8f2d9 | 2013-12-13 00:55:42 | [diff] [blame] | 769 | point at branches that you are interested in. This default behavior |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 770 | can be changed by using the --tags or --no-tags options or by |
Junio C Hamano | 322c624 | 2015-03-23 21:32:46 | [diff] [blame] | 771 | configuring remote.<name>.tagOpt. By using a refspec that fetches tags |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 772 | explicitly, you can fetch tags that do not point into branches you |
| 773 | are interested in as well.</p></div> |
| 774 | <div class="paragraph"><p><em>git fetch</em> can fetch from either a single named repository or URL, |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 775 | or from several repositories at once if <group> is given and |
| 776 | there is a remotes.<group> entry in the configuration file. |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 777 | (See <a href="git-config.html">git-config(1)</a>).</p></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 778 | <div class="paragraph"><p>When no remote is specified, by default the <code>origin</code> remote will be used, |
Junio C Hamano | cf77b04 | 2013-12-17 23:54:21 | [diff] [blame] | 779 | unless there’s an upstream branch configured for the current branch.</p></div> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 780 | <div class="paragraph"><p>The names of refs that are fetched, together with the object names |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 781 | they point at, are written to <code>.git/FETCH_HEAD</code>. This information |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 782 | may be used by scripts or other git commands, such as <a href="git-pull.html">git-pull(1)</a>.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 783 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 784 | </div> |
| 785 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 786 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 787 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 788 | <div class="dlist"><dl> |
| 789 | <dt class="hdlist1"> |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 790 | --all |
| 791 | </dt> |
| 792 | <dd> |
| 793 | <p> |
| 794 | Fetch all remotes. |
| 795 | </p> |
| 796 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 797 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 798 | -a |
| 799 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 800 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 801 | --append |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 802 | </dt> |
| 803 | <dd> |
| 804 | <p> |
| 805 | Append ref names and object names of fetched refs to the |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 806 | existing contents of <code>.git/FETCH_HEAD</code>. Without this |
| 807 | option old data in <code>.git/FETCH_HEAD</code> will be overwritten. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 808 | </p> |
| 809 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 810 | <dt class="hdlist1"> |
Junio C Hamano | 7887f9b | 2021-01-25 23:32:33 | [diff] [blame] | 811 | --atomic |
| 812 | </dt> |
| 813 | <dd> |
| 814 | <p> |
| 815 | Use an atomic transaction to update local refs. Either all refs are |
| 816 | updated, or on error, no refs are updated. |
| 817 | </p> |
| 818 | </dd> |
| 819 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 820 | --depth=<depth> |
Junio C Hamano | e663a7a | 2006-01-25 12:37:28 | [diff] [blame] | 821 | </dt> |
Junio C Hamano | e663a7a | 2006-01-25 12:37:28 | [diff] [blame] | 822 | <dd> |
| 823 | <p> |
Junio C Hamano | 4e6ba27 | 2016-01-20 23:23:19 | [diff] [blame] | 824 | Limit fetching to the specified number of commits from the tip of |
| 825 | each remote branch history. If fetching to a <em>shallow</em> repository |
| 826 | created by <code>git clone</code> with <code>--depth=<depth></code> option (see |
| 827 | <a href="git-clone.html">git-clone(1)</a>), deepen or shorten the history to the specified |
| 828 | number of commits. Tags for the deepened commits are not fetched. |
Junio C Hamano | e663a7a | 2006-01-25 12:37:28 | [diff] [blame] | 829 | </p> |
| 830 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 831 | <dt class="hdlist1"> |
Junio C Hamano | 20829a4 | 2016-10-10 23:24:44 | [diff] [blame] | 832 | --deepen=<depth> |
| 833 | </dt> |
| 834 | <dd> |
| 835 | <p> |
| 836 | Similar to --depth, except it specifies the number of commits |
| 837 | from the current shallow boundary instead of from the tip of |
| 838 | each remote branch history. |
| 839 | </p> |
| 840 | </dd> |
| 841 | <dt class="hdlist1"> |
| 842 | --shallow-since=<date> |
| 843 | </dt> |
| 844 | <dd> |
| 845 | <p> |
| 846 | Deepen or shorten the history of a shallow repository to |
| 847 | include all reachable commits after <date>. |
| 848 | </p> |
| 849 | </dd> |
| 850 | <dt class="hdlist1"> |
| 851 | --shallow-exclude=<revision> |
| 852 | </dt> |
| 853 | <dd> |
| 854 | <p> |
| 855 | Deepen or shorten the history of a shallow repository to |
| 856 | exclude commits reachable from a specified remote branch or tag. |
| 857 | This option can be specified multiple times. |
| 858 | </p> |
| 859 | </dd> |
| 860 | <dt class="hdlist1"> |
Junio C Hamano | 0d1122e | 2013-02-01 21:37:02 | [diff] [blame] | 861 | --unshallow |
| 862 | </dt> |
| 863 | <dd> |
| 864 | <p> |
Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame] | 865 | If the source repository is complete, convert a shallow |
| 866 | repository to a complete one, removing all the limitations |
| 867 | imposed by shallow repositories. |
| 868 | </p> |
| 869 | <div class="paragraph"><p>If the source repository is shallow, fetch as much as possible so that |
| 870 | the current repository has the same history as the source repository.</p></div> |
| 871 | </dd> |
| 872 | <dt class="hdlist1"> |
| 873 | --update-shallow |
| 874 | </dt> |
| 875 | <dd> |
| 876 | <p> |
| 877 | By default when fetching from a shallow repository, |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 878 | <code>git fetch</code> refuses refs that require updating |
Junio C Hamano | 61525f9 | 2014-01-17 22:46:49 | [diff] [blame] | 879 | .git/shallow. This option updates .git/shallow and accept such |
| 880 | refs. |
Junio C Hamano | 0d1122e | 2013-02-01 21:37:02 | [diff] [blame] | 881 | </p> |
| 882 | </dd> |
| 883 | <dt class="hdlist1"> |
Junio C Hamano | f09b7cd | 2018-08-02 23:01:45 | [diff] [blame] | 884 | --negotiation-tip=<commit|glob> |
| 885 | </dt> |
| 886 | <dd> |
| 887 | <p> |
| 888 | By default, Git will report, to the server, commits reachable |
| 889 | from all local refs to find common commits in an attempt to |
| 890 | reduce the size of the to-be-received packfile. If specified, |
| 891 | Git will only report commits reachable from the given tips. |
| 892 | This is useful to speed up fetches when the user knows which |
| 893 | local ref is likely to have commits in common with the |
| 894 | upstream ref being fetched. |
| 895 | </p> |
| 896 | <div class="paragraph"><p>This option may be specified more than once; if so, Git will report |
| 897 | commits reachable from any of the given commits.</p></div> |
| 898 | <div class="paragraph"><p>The argument to this option may be a glob on ref names, a ref, or the (possibly |
| 899 | abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying |
| 900 | this option multiple times, one for each matching ref name.</p></div> |
Junio C Hamano | 3c27de6 | 2021-07-19 21:04:03 | [diff] [blame] | 901 | <div class="paragraph"><p>See also the <code>fetch.negotiationAlgorithm</code> and <code>push.negotiate</code> |
| 902 | configuration variables documented in <a href="git-config.html">git-config(1)</a>, and the |
| 903 | <code>--negotiate-only</code> option below.</p></div> |
| 904 | </dd> |
| 905 | <dt class="hdlist1"> |
| 906 | --negotiate-only |
| 907 | </dt> |
| 908 | <dd> |
| 909 | <p> |
| 910 | Do not fetch anything from the server, and instead print the |
| 911 | ancestors of the provided <code>--negotiation-tip=*</code> arguments, |
| 912 | which we have in common with the server. |
| 913 | </p> |
Junio C Hamano | f1fc6ca | 2022-02-17 01:32:33 | [diff] [blame] | 914 | <div class="paragraph"><p>This is incompatible with <code>--recurse-submodules=[yes|on-demand]</code>. |
| 915 | Internally this is used to implement the <code>push.negotiate</code> option, see |
Junio C Hamano | 3c27de6 | 2021-07-19 21:04:03 | [diff] [blame] | 916 | <a href="git-config.html">git-config(1)</a>.</p></div> |
Junio C Hamano | f09b7cd | 2018-08-02 23:01:45 | [diff] [blame] | 917 | </dd> |
| 918 | <dt class="hdlist1"> |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 919 | --dry-run |
| 920 | </dt> |
| 921 | <dd> |
| 922 | <p> |
| 923 | Show what would be done, without making any changes. |
| 924 | </p> |
| 925 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 926 | <dt class="hdlist1"> |
Junio C Hamano | 48d7a8a | 2020-08-24 22:56:56 | [diff] [blame] | 927 | --[no-]write-fetch-head |
| 928 | </dt> |
| 929 | <dd> |
| 930 | <p> |
| 931 | Write the list of remote refs fetched in the <code>FETCH_HEAD</code> |
| 932 | file directly under <code>$GIT_DIR</code>. This is the default. |
| 933 | Passing <code>--no-write-fetch-head</code> from the command line tells |
| 934 | Git not to write the file. Under <code>--dry-run</code> option, the |
| 935 | file is never written. |
| 936 | </p> |
| 937 | </dd> |
| 938 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 939 | -f |
| 940 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 941 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 942 | --force |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 943 | </dt> |
| 944 | <dd> |
| 945 | <p> |
Junio C Hamano | 980e61e | 2018-09-17 22:45:52 | [diff] [blame] | 946 | When <em>git fetch</em> is used with <code><src>:<dst></code> refspec it may |
| 947 | refuse to update the local branch as discussed |
| 948 | in the <code><refspec></code> part below. |
| 949 | This option overrides that check. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 950 | </p> |
| 951 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 952 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 953 | -k |
| 954 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 955 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 956 | --keep |
| 957 | </dt> |
| 958 | <dd> |
| 959 | <p> |
| 960 | Keep downloaded pack. |
| 961 | </p> |
| 962 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 963 | <dt class="hdlist1"> |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 964 | --multiple |
| 965 | </dt> |
| 966 | <dd> |
| 967 | <p> |
| 968 | Allow several <repository> and <group> arguments to be |
| 969 | specified. No <refspec>s may be specified. |
| 970 | </p> |
| 971 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 972 | <dt class="hdlist1"> |
Junio C Hamano | c562f6d | 2020-09-25 22:50:12 | [diff] [blame] | 973 | --[no-]auto-maintenance |
| 974 | </dt> |
| 975 | <dt class="hdlist1"> |
Junio C Hamano | c9f11c2 | 2019-07-10 02:54:04 | [diff] [blame] | 976 | --[no-]auto-gc |
| 977 | </dt> |
| 978 | <dd> |
| 979 | <p> |
Junio C Hamano | c562f6d | 2020-09-25 22:50:12 | [diff] [blame] | 980 | Run <code>git maintenance run --auto</code> at the end to perform automatic |
| 981 | repository maintenance if needed. (<code>--[no-]auto-gc</code> is a synonym.) |
| 982 | This is enabled by default. |
Junio C Hamano | c9f11c2 | 2019-07-10 02:54:04 | [diff] [blame] | 983 | </p> |
| 984 | </dd> |
| 985 | <dt class="hdlist1"> |
Junio C Hamano | 8ef91f3 | 2019-12-01 22:58:27 | [diff] [blame] | 986 | --[no-]write-commit-graph |
| 987 | </dt> |
| 988 | <dd> |
| 989 | <p> |
| 990 | Write a commit-graph after fetching. This overrides the config |
| 991 | setting <code>fetch.writeCommitGraph</code>. |
| 992 | </p> |
| 993 | </dd> |
| 994 | <dt class="hdlist1"> |
Junio C Hamano | 4078a55 | 2021-04-30 06:08:10 | [diff] [blame] | 995 | --prefetch |
| 996 | </dt> |
| 997 | <dd> |
| 998 | <p> |
| 999 | Modify the configured refspec to place all refs into the |
| 1000 | <code>refs/prefetch/</code> namespace. See the <code>prefetch</code> task in |
| 1001 | <a href="git-maintenance.html">git-maintenance(1)</a>. |
| 1002 | </p> |
| 1003 | </dd> |
| 1004 | <dt class="hdlist1"> |
Junio C Hamano | 70664a0 | 2010-07-13 22:48:05 | [diff] [blame] | 1005 | -p |
| 1006 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1007 | <dt class="hdlist1"> |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 1008 | --prune |
| 1009 | </dt> |
| 1010 | <dd> |
| 1011 | <p> |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame] | 1012 | Before fetching, remove any remote-tracking references that no |
Junio C Hamano | 4c8f2d9 | 2013-12-13 00:55:42 | [diff] [blame] | 1013 | longer exist on the remote. Tags are not subject to pruning |
| 1014 | if they are fetched only because of the default tag |
| 1015 | auto-following or due to a --tags option. However, if tags |
| 1016 | are fetched due to an explicit refspec (either on the command |
| 1017 | line or in the remote configuration, for example if the remote |
| 1018 | was cloned with the --mirror option), then they are also |
Junio C Hamano | 664750f | 2018-03-06 23:25:44 | [diff] [blame] | 1019 | subject to pruning. Supplying <code>--prune-tags</code> is a shorthand for |
| 1020 | providing the tag refspec. |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 1021 | </p> |
Junio C Hamano | 664750f | 2018-03-06 23:25:44 | [diff] [blame] | 1022 | <div class="paragraph"><p>See the PRUNING section below for more details.</p></div> |
| 1023 | </dd> |
| 1024 | <dt class="hdlist1"> |
| 1025 | -P |
| 1026 | </dt> |
| 1027 | <dt class="hdlist1"> |
| 1028 | --prune-tags |
| 1029 | </dt> |
| 1030 | <dd> |
| 1031 | <p> |
| 1032 | Before fetching, remove any local tags that no longer exist on |
| 1033 | the remote if <code>--prune</code> is enabled. This option should be used |
| 1034 | more carefully, unlike <code>--prune</code> it will remove any local |
| 1035 | references (local tags) that have been created. This option is |
| 1036 | a shorthand for providing the explicit tag refspec along with |
| 1037 | <code>--prune</code>, see the discussion about that in its documentation. |
| 1038 | </p> |
| 1039 | <div class="paragraph"><p>See the PRUNING section below for more details.</p></div> |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 1040 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1041 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1042 | -n |
| 1043 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1044 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1045 | --no-tags |
Junio C Hamano | 4d04a40 | 2006-01-09 00:53:28 | [diff] [blame] | 1046 | </dt> |
| 1047 | <dd> |
| 1048 | <p> |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1049 | By default, tags that point at objects that are downloaded |
| 1050 | from the remote repository are fetched and stored locally. |
Junio C Hamano | 075ae87 | 2010-09-01 18:43:07 | [diff] [blame] | 1051 | This option disables this automatic tag following. The default |
Junio C Hamano | 322c624 | 2015-03-23 21:32:46 | [diff] [blame] | 1052 | behavior for a remote may be specified with the remote.<name>.tagOpt |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1053 | setting. See <a href="git-config.html">git-config(1)</a>. |
Junio C Hamano | 4d04a40 | 2006-01-09 00:53:28 | [diff] [blame] | 1054 | </p> |
| 1055 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1056 | <dt class="hdlist1"> |
Junio C Hamano | 4bea028 | 2022-04-04 18:21:49 | [diff] [blame] | 1057 | --refetch |
| 1058 | </dt> |
| 1059 | <dd> |
| 1060 | <p> |
| 1061 | Instead of negotiating with the server to avoid transferring commits and |
| 1062 | associated objects that are already present locally, this option fetches |
| 1063 | all objects as a fresh clone would. Use this to reapply a partial clone |
| 1064 | filter from configuration or using <code>--filter=</code> when the filter |
| 1065 | definition has changed. Automatic post-fetch maintenance will perform |
| 1066 | object database pack consolidation to remove any duplicate objects. |
| 1067 | </p> |
| 1068 | </dd> |
| 1069 | <dt class="hdlist1"> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1070 | --refmap=<refspec> |
| 1071 | </dt> |
| 1072 | <dd> |
| 1073 | <p> |
| 1074 | When fetching refs listed on the command line, use the |
| 1075 | specified refspec (can be given more than once) to map the |
| 1076 | refs to remote-tracking branches, instead of the values of |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1077 | <code>remote.*.fetch</code> configuration variables for the remote |
Junio C Hamano | bee061d | 2020-01-30 23:21:18 | [diff] [blame] | 1078 | repository. Providing an empty <code><refspec></code> to the |
| 1079 | <code>--refmap</code> option causes Git to ignore the configured |
| 1080 | refspecs and rely entirely on the refspecs supplied as |
| 1081 | command-line arguments. See section on "Configured Remote-tracking |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1082 | Branches" for details. |
| 1083 | </p> |
| 1084 | </dd> |
| 1085 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1086 | -t |
| 1087 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1088 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1089 | --tags |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1090 | </dt> |
| 1091 | <dd> |
| 1092 | <p> |
Junio C Hamano | 4c8f2d9 | 2013-12-13 00:55:42 | [diff] [blame] | 1093 | Fetch all tags from the remote (i.e., fetch remote tags |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1094 | <code>refs/tags/*</code> into local tags with the same name), in addition |
Junio C Hamano | 4c8f2d9 | 2013-12-13 00:55:42 | [diff] [blame] | 1095 | to whatever else would otherwise be fetched. Using this |
| 1096 | option alone does not subject tags to pruning, even if --prune |
| 1097 | is used (though tags may be pruned anyway if they are also the |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1098 | destination of an explicit refspec; see <code>--prune</code>). |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1099 | </p> |
| 1100 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1101 | <dt class="hdlist1"> |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 1102 | --recurse-submodules[=yes|on-demand|no] |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 1103 | </dt> |
| 1104 | <dd> |
| 1105 | <p> |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 1106 | This option controls if and under what conditions new commits of |
Junio C Hamano | 67fef49 | 2022-03-27 17:31:23 | [diff] [blame] | 1107 | submodules should be fetched too. When recursing through submodules, |
| 1108 | <code>git fetch</code> always attempts to fetch "changed" submodules, that is, a |
| 1109 | submodule that has commits that are referenced by a newly fetched |
| 1110 | superproject commit but are missing in the local submodule clone. A |
| 1111 | changed submodule can be fetched as long as it is present locally e.g. |
| 1112 | in <code>$GIT_DIR/modules/</code> (see <a href="gitsubmodules.html">gitsubmodules(7)</a>); if the upstream |
| 1113 | adds a new submodule, that submodule cannot be fetched until it is |
| 1114 | cloned e.g. by <code>git submodule update</code>. |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 1115 | </p> |
Junio C Hamano | 67fef49 | 2022-03-27 17:31:23 | [diff] [blame] | 1116 | <div class="paragraph"><p>When set to <em>on-demand</em>, only changed submodules are fetched. When set |
| 1117 | to <em>yes</em>, all populated submodules are fetched and submodules that are |
| 1118 | both unpopulated and changed are fetched. When set to <em>no</em>, submodules |
| 1119 | are never fetched.</p></div> |
| 1120 | <div class="paragraph"><p>When unspecified, this uses the value of <code>fetch.recurseSubmodules</code> if it |
| 1121 | is set (see <a href="git-config.html">git-config(1)</a>), defaulting to <em>on-demand</em> if unset. |
| 1122 | When this option is used without any value, it defaults to <em>yes</em>.</p></div> |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 1123 | </dd> |
| 1124 | <dt class="hdlist1"> |
Junio C Hamano | a7da1ba | 2016-01-13 00:19:45 | [diff] [blame] | 1125 | -j |
| 1126 | </dt> |
| 1127 | <dt class="hdlist1"> |
| 1128 | --jobs=<n> |
| 1129 | </dt> |
| 1130 | <dd> |
| 1131 | <p> |
Junio C Hamano | fa2a48b | 2019-10-15 05:24:40 | [diff] [blame] | 1132 | Number of parallel children to be used for all forms of fetching. |
Junio C Hamano | a7da1ba | 2016-01-13 00:19:45 | [diff] [blame] | 1133 | </p> |
Junio C Hamano | fa2a48b | 2019-10-15 05:24:40 | [diff] [blame] | 1134 | <div class="paragraph"><p>If the <code>--multiple</code> option was specified, the different remotes will be fetched |
| 1135 | in parallel. If multiple submodules are fetched, they will be fetched in |
| 1136 | parallel. To control them independently, use the config settings |
| 1137 | <code>fetch.parallel</code> and <code>submodule.fetchJobs</code> (see <a href="git-config.html">git-config(1)</a>).</p></div> |
| 1138 | <div class="paragraph"><p>Typically, parallel recursive and multi-remote fetches will be faster. By |
| 1139 | default fetches are performed sequentially, not in parallel.</p></div> |
Junio C Hamano | a7da1ba | 2016-01-13 00:19:45 | [diff] [blame] | 1140 | </dd> |
| 1141 | <dt class="hdlist1"> |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 1142 | --no-recurse-submodules |
| 1143 | </dt> |
| 1144 | <dd> |
| 1145 | <p> |
| 1146 | Disable recursive fetching of submodules (this has the same effect as |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1147 | using the <code>--recurse-submodules=no</code> option). |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 1148 | </p> |
| 1149 | </dd> |
| 1150 | <dt class="hdlist1"> |
Junio C Hamano | cb70539 | 2019-09-18 19:30:01 | [diff] [blame] | 1151 | --set-upstream |
| 1152 | </dt> |
| 1153 | <dd> |
| 1154 | <p> |
Junio C Hamano | 779537c | 2020-08-19 23:48:51 | [diff] [blame] | 1155 | If the remote is fetched successfully, add upstream |
Junio C Hamano | cb70539 | 2019-09-18 19:30:01 | [diff] [blame] | 1156 | (tracking) reference, used by argument-less |
| 1157 | <a href="git-pull.html">git-pull(1)</a> and other commands. For more information, |
| 1158 | see <code>branch.<name>.merge</code> and <code>branch.<name>.remote</code> in |
| 1159 | <a href="git-config.html">git-config(1)</a>. |
| 1160 | </p> |
| 1161 | </dd> |
| 1162 | <dt class="hdlist1"> |
Junio C Hamano | 0d75e87 | 2010-12-17 06:57:26 | [diff] [blame] | 1163 | --submodule-prefix=<path> |
| 1164 | </dt> |
| 1165 | <dd> |
| 1166 | <p> |
| 1167 | Prepend <path> to paths printed in informative messages |
| 1168 | such as "Fetching submodule foo". This option is used |
| 1169 | internally when recursing over submodules. |
| 1170 | </p> |
| 1171 | </dd> |
| 1172 | <dt class="hdlist1"> |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 1173 | --recurse-submodules-default=[yes|on-demand] |
| 1174 | </dt> |
| 1175 | <dd> |
| 1176 | <p> |
| 1177 | This option is used internally to temporarily provide a |
| 1178 | non-negative default value for the --recurse-submodules |
| 1179 | option. All other methods of configuring fetch’s submodule |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1180 | recursion (such as settings in <a href="gitmodules.html">gitmodules(5)</a> and |
| 1181 | <a href="git-config.html">git-config(1)</a>) override this option, as does |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 1182 | specifying --[no-]recurse-submodules directly. |
| 1183 | </p> |
| 1184 | </dd> |
| 1185 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1186 | -u |
| 1187 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1188 | <dt class="hdlist1"> |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 1189 | --update-head-ok |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1190 | </dt> |
| 1191 | <dd> |
| 1192 | <p> |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1193 | By default <em>git fetch</em> refuses to update the head which |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1194 | corresponds to the current branch. This flag disables the |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 1195 | check. This is purely for the internal use for <em>git pull</em> |
| 1196 | to communicate with <em>git fetch</em>, and unless you are |
Junio C Hamano | b288d9e | 2007-01-02 00:04:15 | [diff] [blame] | 1197 | implementing your own Porcelain you are not supposed to |
| 1198 | use it. |
| 1199 | </p> |
| 1200 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1201 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1202 | --upload-pack <upload-pack> |
Junio C Hamano | b288d9e | 2007-01-02 00:04:15 | [diff] [blame] | 1203 | </dt> |
| 1204 | <dd> |
| 1205 | <p> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1206 | When given, and the repository to fetch from is handled |
Junio C Hamano | 92d8037 | 2016-07-13 22:00:05 | [diff] [blame] | 1207 | by <em>git fetch-pack</em>, <code>--exec=<upload-pack></code> is passed to |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1208 | the command to specify non-default path for the command |
| 1209 | run on the other end. |
| 1210 | </p> |
| 1211 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1212 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1213 | -q |
| 1214 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1215 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1216 | --quiet |
| 1217 | </dt> |
| 1218 | <dd> |
| 1219 | <p> |
| 1220 | Pass --quiet to git-fetch-pack and silence any other internally |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1221 | used git commands. Progress is not reported to the standard error |
| 1222 | stream. |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1223 | </p> |
| 1224 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1225 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1226 | -v |
| 1227 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1228 | <dt class="hdlist1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1229 | --verbose |
| 1230 | </dt> |
| 1231 | <dd> |
| 1232 | <p> |
| 1233 | Be verbose. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1234 | </p> |
| 1235 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1236 | <dt class="hdlist1"> |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 1237 | --progress |
| 1238 | </dt> |
| 1239 | <dd> |
| 1240 | <p> |
| 1241 | Progress status is reported on the standard error stream |
| 1242 | by default when it is attached to a terminal, unless -q |
| 1243 | is specified. This flag forces progress status even if the |
| 1244 | standard error stream is not directed to a terminal. |
| 1245 | </p> |
| 1246 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1247 | <dt class="hdlist1"> |
Junio C Hamano | b9d9d90 | 2018-05-23 07:07:42 | [diff] [blame] | 1248 | -o <option> |
| 1249 | </dt> |
| 1250 | <dt class="hdlist1"> |
| 1251 | --server-option=<option> |
| 1252 | </dt> |
| 1253 | <dd> |
| 1254 | <p> |
| 1255 | Transmit the given string to the server when communicating using |
| 1256 | protocol version 2. The given string must not contain a NUL or LF |
Junio C Hamano | d1063b1 | 2019-05-08 17:18:07 | [diff] [blame] | 1257 | character. The server’s handling of server options, including |
| 1258 | unknown ones, is server-specific. |
Junio C Hamano | b9d9d90 | 2018-05-23 07:07:42 | [diff] [blame] | 1259 | When multiple <code>--server-option=<option></code> are given, they are all |
| 1260 | sent to the other side in the order listed on the command line. |
| 1261 | </p> |
| 1262 | </dd> |
| 1263 | <dt class="hdlist1"> |
Junio C Hamano | c9f11c2 | 2019-07-10 02:54:04 | [diff] [blame] | 1264 | --show-forced-updates |
| 1265 | </dt> |
| 1266 | <dd> |
| 1267 | <p> |
| 1268 | By default, git checks if a branch is force-updated during |
| 1269 | fetch. This can be disabled through fetch.showForcedUpdates, but |
| 1270 | the --show-forced-updates option guarantees this check occurs. |
| 1271 | See <a href="git-config.html">git-config(1)</a>. |
| 1272 | </p> |
| 1273 | </dd> |
| 1274 | <dt class="hdlist1"> |
| 1275 | --no-show-forced-updates |
| 1276 | </dt> |
| 1277 | <dd> |
| 1278 | <p> |
| 1279 | By default, git checks if a branch is force-updated during |
| 1280 | fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates |
| 1281 | to false to skip this check for performance reasons. If used during |
| 1282 | <em>git-pull</em> the --ff-only option will still check for forced updates |
| 1283 | before attempting a fast-forward update. See <a href="git-config.html">git-config(1)</a>. |
| 1284 | </p> |
| 1285 | </dd> |
| 1286 | <dt class="hdlist1"> |
Junio C Hamano | 3fcdd07 | 2016-02-24 23:41:08 | [diff] [blame] | 1287 | -4 |
| 1288 | </dt> |
| 1289 | <dt class="hdlist1"> |
| 1290 | --ipv4 |
| 1291 | </dt> |
| 1292 | <dd> |
| 1293 | <p> |
| 1294 | Use IPv4 addresses only, ignoring IPv6 addresses. |
| 1295 | </p> |
| 1296 | </dd> |
| 1297 | <dt class="hdlist1"> |
| 1298 | -6 |
| 1299 | </dt> |
| 1300 | <dt class="hdlist1"> |
| 1301 | --ipv6 |
| 1302 | </dt> |
| 1303 | <dd> |
| 1304 | <p> |
| 1305 | Use IPv6 addresses only, ignoring IPv4 addresses. |
| 1306 | </p> |
| 1307 | </dd> |
| 1308 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1309 | <repository> |
| 1310 | </dt> |
| 1311 | <dd> |
| 1312 | <p> |
| 1313 | The "remote" repository that is the source of a fetch |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1314 | or pull operation. This parameter can be either a URL |
| 1315 | (see the section <a href="#URLS">GIT URLS</a> below) or the name |
| 1316 | of a remote (see the section <a href="#REMOTES">REMOTES</a> below). |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1317 | </p> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1318 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1319 | <dt class="hdlist1"> |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 1320 | <group> |
| 1321 | </dt> |
| 1322 | <dd> |
| 1323 | <p> |
| 1324 | A name referring to a list of repositories as the value |
| 1325 | of remotes.<group> in the configuration file. |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1326 | (See <a href="git-config.html">git-config(1)</a>). |
Junio C Hamano | 9df0c66 | 2009-11-23 11:09:27 | [diff] [blame] | 1327 | </p> |
| 1328 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1329 | <dt class="hdlist1"> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1330 | <refspec> |
| 1331 | </dt> |
| 1332 | <dd> |
| 1333 | <p> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1334 | Specifies which refs to fetch and which local refs to update. |
| 1335 | When no <refspec>s appear on the command line, the refs to fetch |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1336 | are read from <code>remote.<repository>.fetch</code> variables instead |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1337 | (see <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> below). |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1338 | </p> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1339 | <div class="paragraph"><p>The format of a <refspec> parameter is an optional plus |
Junio C Hamano | f7e3f47 | 2017-10-20 06:45:24 | [diff] [blame] | 1340 | <code>+</code>, followed by the source <src>, followed |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1341 | by a colon <code>:</code>, followed by the destination ref <dst>. |
Junio C Hamano | f7e3f47 | 2017-10-20 06:45:24 | [diff] [blame] | 1342 | The colon can be omitted when <dst> is empty. <src> is |
| 1343 | typically a ref, but it can also be a fully spelled hex object |
| 1344 | name.</p></div> |
Junio C Hamano | d128151 | 2020-10-05 22:21:55 | [diff] [blame] | 1345 | <div class="paragraph"><p>A <refspec> may contain a <code>*</code> in its <src> to indicate a simple pattern |
| 1346 | match. Such a refspec functions like a glob that matches any ref with the |
| 1347 | same prefix. A pattern <refspec> must have a <code>*</code> in both the <src> and |
| 1348 | <dst>. It will map refs to the destination by replacing the <code>*</code> with the |
| 1349 | contents matched from the source.</p></div> |
| 1350 | <div class="paragraph"><p>If a refspec is prefixed by <code>^</code>, it will be interpreted as a negative |
| 1351 | refspec. Rather than specifying which refs to fetch or which local refs to |
| 1352 | update, such a refspec will instead specify refs to exclude. A ref will be |
| 1353 | considered to match if it matches at least one positive refspec, and does |
| 1354 | not match any negative refspec. Negative refspecs can be useful to restrict |
| 1355 | the scope of a pattern refspec so that it will not include specific refs. |
| 1356 | Negative refspecs can themselves be pattern refspecs. However, they may only |
| 1357 | contain a <src> and do not specify a <dst>. Fully spelled out hex object |
| 1358 | names are also not supported.</p></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1359 | <div class="paragraph"><p><code>tag <tag></code> means the same as <code>refs/tags/<tag>:refs/tags/<tag></code>; |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1360 | it requests fetching everything up to the given tag.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1361 | <div class="paragraph"><p>The remote ref that matches <src> |
Junio C Hamano | 980e61e | 2018-09-17 22:45:52 | [diff] [blame] | 1362 | is fetched, and if <dst> is not an empty string, an attempt |
| 1363 | is made to update the local ref that matches it.</p></div> |
| 1364 | <div class="paragraph"><p>Whether that update is allowed without <code>--force</code> depends on the ref |
| 1365 | namespace it’s being fetched to, the type of object being fetched, and |
| 1366 | whether the update is considered to be a fast-forward. Generally, the |
| 1367 | same rules apply for fetching as when pushing, see the <code><refspec>...</code> |
| 1368 | section of <a href="git-push.html">git-push(1)</a> for what those are. Exceptions to those |
| 1369 | rules particular to <em>git fetch</em> are noted below.</p></div> |
| 1370 | <div class="paragraph"><p>Until Git version 2.20, and unlike when pushing with |
| 1371 | <a href="git-push.html">git-push(1)</a>, any updates to <code>refs/tags/*</code> would be accepted |
Junio C Hamano | ca9da32 | 2018-09-20 21:53:41 | [diff] [blame] | 1372 | without <code>+</code> in the refspec (or <code>--force</code>). When fetching, we promiscuously |
Junio C Hamano | 980e61e | 2018-09-17 22:45:52 | [diff] [blame] | 1373 | considered all tag updates from a remote to be forced fetches. Since |
Junio C Hamano | ca9da32 | 2018-09-20 21:53:41 | [diff] [blame] | 1374 | Git version 2.20, fetching to update <code>refs/tags/*</code> works the same way |
Junio C Hamano | 980e61e | 2018-09-17 22:45:52 | [diff] [blame] | 1375 | as when pushing. I.e. any updates will be rejected without <code>+</code> in the |
| 1376 | refspec (or <code>--force</code>).</p></div> |
| 1377 | <div class="paragraph"><p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, any updates outside of |
| 1378 | <code>refs/{tags,heads}/*</code> will be accepted without <code>+</code> in the refspec (or |
| 1379 | <code>--force</code>), whether that’s swapping e.g. a tree object for a blob, or |
| 1380 | a commit for another commit that’s doesn’t have the previous commit as |
| 1381 | an ancestor etc.</p></div> |
| 1382 | <div class="paragraph"><p>Unlike when pushing with <a href="git-push.html">git-push(1)</a>, there is no |
| 1383 | configuration which’ll amend these rules, and nothing like a |
| 1384 | <code>pre-fetch</code> hook analogous to the <code>pre-receive</code> hook.</p></div> |
| 1385 | <div class="paragraph"><p>As with pushing with <a href="git-push.html">git-push(1)</a>, all of the rules described |
| 1386 | above about what’s not allowed as an update can be overridden by |
| 1387 | adding an the optional leading <code>+</code> to a refspec (or using <code>--force</code> |
| 1388 | command line option). The only exception to this is that no amount of |
| 1389 | forcing will make the <code>refs/heads/*</code> namespace accept a non-commit |
| 1390 | object.</p></div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1391 | <div class="admonitionblock"> |
| 1392 | <table><tr> |
| 1393 | <td class="icon"> |
| 1394 | <div class="title">Note</div> |
| 1395 | </td> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1396 | <td class="content">When the remote branch you want to fetch is known to |
| 1397 | be rewound and rebased regularly, it is expected that |
| 1398 | its new tip will not be descendant of its previous tip |
| 1399 | (as stored in your remote-tracking branch the last time |
| 1400 | you fetched). You would want |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1401 | to use the <code>+</code> sign to indicate non-fast-forward updates |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1402 | will be needed for such branches. There is no way to |
| 1403 | determine or declare that a branch will be made available |
| 1404 | in a repository with this behavior; the pulling user simply |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1405 | must know this is the expected usage pattern for a branch.</td> |
| 1406 | </tr></table> |
| 1407 | </div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1408 | </dd> |
Junio C Hamano | 558abd2 | 2020-09-03 20:22:34 | [diff] [blame] | 1409 | <dt class="hdlist1"> |
| 1410 | --stdin |
| 1411 | </dt> |
| 1412 | <dd> |
| 1413 | <p> |
| 1414 | Read refspecs, one per line, from stdin in addition to those provided |
| 1415 | as arguments. The "tag <name>" format is not supported. |
| 1416 | </p> |
| 1417 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1418 | </dl></div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1419 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1420 | </div> |
| 1421 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1422 | <h2 id="_git_urls_a_id_urls_a">GIT URLS<a id="URLS"></a></h2> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1423 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1424 | <div class="paragraph"><p>In general, URLs contain information about the transport protocol, the |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1425 | address of the remote server, and the path to the repository. |
| 1426 | Depending on the transport protocol, some of this information may be |
| 1427 | absent.</p></div> |
Junio C Hamano | 6631a09 | 2012-10-10 22:50:57 | [diff] [blame] | 1428 | <div class="paragraph"><p>Git supports ssh, git, http, and https protocols (in addition, ftp, |
Junio C Hamano | f85ef63 | 2016-02-17 22:31:06 | [diff] [blame] | 1429 | and ftps can be used for fetching, but this is inefficient and |
| 1430 | deprecated; do not use it).</p></div> |
Junio C Hamano | a195230 | 2013-07-01 21:31:18 | [diff] [blame] | 1431 | <div class="paragraph"><p>The native transport (i.e. git:// URL) does no authentication and |
| 1432 | should be used with caution on unsecured networks.</p></div> |
Junio C Hamano | 6631a09 | 2012-10-10 22:50:57 | [diff] [blame] | 1433 | <div class="paragraph"><p>The following syntaxes may be used with them:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1434 | <div class="ulist"><ul> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1435 | <li> |
| 1436 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1437 | ssh://[user@]host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1438 | </p> |
| 1439 | </li> |
| 1440 | <li> |
| 1441 | <p> |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 1442 | git://host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1443 | </p> |
| 1444 | </li> |
| 1445 | <li> |
| 1446 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1447 | http[s]://host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1448 | </p> |
| 1449 | </li> |
| 1450 | <li> |
| 1451 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1452 | ftp[s]://host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1453 | </p> |
| 1454 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1455 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1456 | <div class="paragraph"><p>An alternative scp-like syntax may also be used with the ssh protocol:</p></div> |
| 1457 | <div class="ulist"><ul> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1458 | <li> |
| 1459 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1460 | [user@]host.xz:path/to/repo.git/ |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1461 | </p> |
| 1462 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1463 | </ul></div> |
Junio C Hamano | 7e590a1 | 2013-06-02 23:46:52 | [diff] [blame] | 1464 | <div class="paragraph"><p>This syntax is only recognized if there are no slashes before the |
| 1465 | first colon. This helps differentiate a local path that contains a |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1466 | colon. For example the local path <code>foo:bar</code> could be specified as an |
| 1467 | absolute path or <code>./foo:bar</code> to avoid being misinterpreted as an ssh |
Junio C Hamano | 7e590a1 | 2013-06-02 23:46:52 | [diff] [blame] | 1468 | url.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1469 | <div class="paragraph"><p>The ssh and git protocols additionally support ~username expansion:</p></div> |
| 1470 | <div class="ulist"><ul> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1471 | <li> |
| 1472 | <p> |
| 1473 | ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/ |
| 1474 | </p> |
| 1475 | </li> |
| 1476 | <li> |
| 1477 | <p> |
| 1478 | git://host.xz[:port]/~[user]/path/to/repo.git/ |
| 1479 | </p> |
| 1480 | </li> |
| 1481 | <li> |
| 1482 | <p> |
| 1483 | [user@]host.xz:/~[user]/path/to/repo.git/ |
| 1484 | </p> |
| 1485 | </li> |
| 1486 | </ul></div> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1487 | <div class="paragraph"><p>For local repositories, also supported by Git natively, the following |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1488 | syntaxes may be used:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1489 | <div class="ulist"><ul> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1490 | <li> |
| 1491 | <p> |
| 1492 | /path/to/repo.git/ |
| 1493 | </p> |
| 1494 | </li> |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 1495 | <li> |
| 1496 | <p> |
Junio C Hamano | dc8f8de | 2013-06-05 22:58:07 | [diff] [blame] | 1497 | file:///path/to/repo.git/ |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 1498 | </p> |
| 1499 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1500 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1501 | <div class="paragraph"><p>These two syntaxes are mostly equivalent, except when cloning, when |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1502 | the former implies --local option. See <a href="git-clone.html">git-clone(1)</a> for |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1503 | details.</p></div> |
Junio C Hamano | b489685 | 2019-12-10 23:15:09 | [diff] [blame] | 1504 | <div class="paragraph"><p><em>git clone</em>, <em>git fetch</em> and <em>git pull</em>, but not <em>git push</em>, will also |
| 1505 | accept a suitable bundle file. See <a href="git-bundle.html">git-bundle(1)</a>.</p></div> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1506 | <div class="paragraph"><p>When Git doesn’t know how to handle a certain transport protocol, it |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1507 | attempts to use the <em>remote-<transport></em> remote helper, if one |
| 1508 | exists. To explicitly request a remote helper, the following syntax |
| 1509 | may be used:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1510 | <div class="ulist"><ul> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1511 | <li> |
| 1512 | <p> |
| 1513 | <transport>::<address> |
| 1514 | </p> |
| 1515 | </li> |
| 1516 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1517 | <div class="paragraph"><p>where <address> may be a path, a server and path, or an arbitrary |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1518 | URL-like string recognized by the specific remote helper being |
Junio C Hamano | b551377 | 2019-04-22 03:38:39 | [diff] [blame] | 1519 | invoked. See <a href="gitremote-helpers.html">gitremote-helpers(7)</a> for details.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1520 | <div class="paragraph"><p>If there are a large number of similarly-named remote repositories and |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1521 | you want to use a different format for them (such that the URLs you |
| 1522 | use will be rewritten into URLs that work), you can create a |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1523 | configuration section of the form:</p></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1524 | <div class="listingblock"> |
| 1525 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1526 | <pre><code> [url "<actual url base>"] |
| 1527 | insteadOf = <other url base></code></pre> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1528 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1529 | <div class="paragraph"><p>For example, with this:</p></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1530 | <div class="listingblock"> |
| 1531 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1532 | <pre><code> [url "git://git.host.xz/"] |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1533 | insteadOf = host.xz:/path/to/ |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1534 | insteadOf = work:</code></pre> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1535 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1536 | <div class="paragraph"><p>a URL like "work:repo.git" or like "host.xz:/path/to/repo.git" will be |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1537 | rewritten in any context that takes a URL to be "git://git.host.xz/repo.git".</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1538 | <div class="paragraph"><p>If you want to rewrite URLs for push only, you can create a |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1539 | configuration section of the form:</p></div> |
| 1540 | <div class="listingblock"> |
| 1541 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1542 | <pre><code> [url "<actual url base>"] |
| 1543 | pushInsteadOf = <other url base></code></pre> |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1544 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1545 | <div class="paragraph"><p>For example, with this:</p></div> |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1546 | <div class="listingblock"> |
| 1547 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1548 | <pre><code> [url "ssh://example.org/"] |
| 1549 | pushInsteadOf = git://example.org/</code></pre> |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1550 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1551 | <div class="paragraph"><p>a URL like "git://example.org/path/to/repo.git" will be rewritten to |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1552 | "ssh://example.org/path/to/repo.git" for pushes, but pulls will still |
| 1553 | use the original URL.</p></div> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1554 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1555 | </div> |
| 1556 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1557 | <h2 id="_remotes_a_id_remotes_a">REMOTES<a id="REMOTES"></a></h2> |
Junio C Hamano | 40f2f8d | 2006-02-07 08:04:39 | [diff] [blame] | 1558 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1559 | <div class="paragraph"><p>The name of one of the following can be used instead |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1560 | of a URL as <code><repository></code> argument:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1561 | <div class="ulist"><ul> |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1562 | <li> |
| 1563 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1564 | a remote in the Git configuration file: <code>$GIT_DIR/config</code>, |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1565 | </p> |
| 1566 | </li> |
| 1567 | <li> |
| 1568 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1569 | a file in the <code>$GIT_DIR/remotes</code> directory, or |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1570 | </p> |
| 1571 | </li> |
| 1572 | <li> |
| 1573 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1574 | a file in the <code>$GIT_DIR/branches</code> directory. |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1575 | </p> |
| 1576 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1577 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1578 | <div class="paragraph"><p>All of these also allow you to omit the refspec from the command line |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1579 | because they each contain a refspec which git will use by default.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1580 | <div class="sect2"> |
| 1581 | <h3 id="_named_remote_in_configuration_file">Named remote in configuration file</h3> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1582 | <div class="paragraph"><p>You can choose to provide the name of a remote which you had previously |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1583 | configured using <a href="git-remote.html">git-remote(1)</a>, <a href="git-config.html">git-config(1)</a> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1584 | or even by a manual edit to the <code>$GIT_DIR/config</code> file. The URL of |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1585 | this remote will be used to access the repository. The refspec |
| 1586 | of this remote will be used by default when you do |
| 1587 | not provide a refspec on the command line. The entry in the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1588 | config file would appear like this:</p></div> |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1589 | <div class="listingblock"> |
| 1590 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1591 | <pre><code> [remote "<name>"] |
Junio C Hamano | 59a32b0 | 2021-12-10 22:53:38 | [diff] [blame] | 1592 | url = <URL> |
Junio C Hamano | 0e88f3e | 2009-06-21 08:03:25 | [diff] [blame] | 1593 | pushurl = <pushurl> |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1594 | push = <refspec> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1595 | fetch = <refspec></code></pre> |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1596 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1597 | <div class="paragraph"><p>The <code><pushurl></code> is used for pushes only. It is optional and defaults |
Junio C Hamano | 3583c5c | 2023-02-22 23:31:59 | [diff] [blame] | 1598 | to <code><URL></code>. Pushing to a remote affects all defined pushurls or to all |
| 1599 | defined urls if no pushurls are defined. Fetch, however, will only |
| 1600 | fetch from the first defined url if muliple urls are defined.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1601 | </div> |
| 1602 | <div class="sect2"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1603 | <h3 id="_named_file_in_code_git_dir_remotes_code">Named file in <code>$GIT_DIR/remotes</code></h3> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1604 | <div class="paragraph"><p>You can choose to provide the name of a |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1605 | file in <code>$GIT_DIR/remotes</code>. The URL |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1606 | in this file will be used to access the repository. The refspec |
| 1607 | in this file will be used as default when you do not |
| 1608 | provide a refspec on the command line. This file should have the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1609 | following format:</p></div> |
Junio C Hamano | 1caaf47 | 2006-12-31 08:29:35 | [diff] [blame] | 1610 | <div class="listingblock"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1611 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1612 | <pre><code> URL: one of the above URL format |
Junio C Hamano | d3361ad | 2007-01-01 03:20:24 | [diff] [blame] | 1613 | Push: <refspec> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1614 | Pull: <refspec></code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1615 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1616 | <div class="paragraph"><p><code>Push:</code> lines are used by <em>git push</em> and |
| 1617 | <code>Pull:</code> lines are used by <em>git pull</em> and <em>git fetch</em>. |
| 1618 | Multiple <code>Push:</code> and <code>Pull:</code> lines may |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1619 | be specified for additional branch mappings.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1620 | </div> |
| 1621 | <div class="sect2"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1622 | <h3 id="_named_file_in_code_git_dir_branches_code">Named file in <code>$GIT_DIR/branches</code></h3> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1623 | <div class="paragraph"><p>You can choose to provide the name of a |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1624 | file in <code>$GIT_DIR/branches</code>. |
Junio C Hamano | 054ea08 | 2008-06-01 08:26:34 | [diff] [blame] | 1625 | The URL in this file will be used to access the repository. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1626 | This file should have the following format:</p></div> |
Junio C Hamano | 1caaf47 | 2006-12-31 08:29:35 | [diff] [blame] | 1627 | <div class="listingblock"> |
Junio C Hamano | 249572f | 2006-10-24 05:44:08 | [diff] [blame] | 1628 | <div class="content"> |
Junio C Hamano | 59a32b0 | 2021-12-10 22:53:38 | [diff] [blame] | 1629 | <pre><code> <URL>#<head></code></pre> |
Junio C Hamano | 249572f | 2006-10-24 05:44:08 | [diff] [blame] | 1630 | </div></div> |
Junio C Hamano | 59a32b0 | 2021-12-10 22:53:38 | [diff] [blame] | 1631 | <div class="paragraph"><p><code><URL></code> is required; <code>#<head></code> is optional.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1632 | <div class="paragraph"><p>Depending on the operation, git will use one of the following |
| 1633 | refspecs, if you don’t provide one on the command line. |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1634 | <code><branch></code> is the name of this file in <code>$GIT_DIR/branches</code> and |
| 1635 | <code><head></code> defaults to <code>master</code>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1636 | <div class="paragraph"><p>git fetch uses:</p></div> |
Junio C Hamano | 1caaf47 | 2006-12-31 08:29:35 | [diff] [blame] | 1637 | <div class="listingblock"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1638 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1639 | <pre><code> refs/heads/<head>:refs/heads/<branch></code></pre> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1640 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1641 | <div class="paragraph"><p>git push uses:</p></div> |
Junio C Hamano | 2836349 | 2008-11-14 08:26:31 | [diff] [blame] | 1642 | <div class="listingblock"> |
| 1643 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1644 | <pre><code> HEAD:refs/heads/<head></code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1645 | </div></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1646 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1647 | </div> |
| 1648 | </div> |
| 1649 | <div class="sect1"> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1650 | <h2 id="_configured_remote_tracking_branches_a_id_crtb_a">CONFIGURED REMOTE-TRACKING BRANCHES<a id="CRTB"></a></h2> |
| 1651 | <div class="sectionbody"> |
| 1652 | <div class="paragraph"><p>You often interact with the same remote repository by |
| 1653 | regularly and repeatedly fetching from it. In order to keep track |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1654 | of the progress of such a remote repository, <code>git fetch</code> allows you |
| 1655 | to configure <code>remote.<repository>.fetch</code> configuration variables.</p></div> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1656 | <div class="paragraph"><p>Typically such a variable may look like this:</p></div> |
| 1657 | <div class="listingblock"> |
| 1658 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1659 | <pre><code>[remote "origin"] |
| 1660 | fetch = +refs/heads/*:refs/remotes/origin/*</code></pre> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1661 | </div></div> |
| 1662 | <div class="paragraph"><p>This configuration is used in two ways:</p></div> |
| 1663 | <div class="ulist"><ul> |
| 1664 | <li> |
| 1665 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1666 | When <code>git fetch</code> is run without specifying what branches |
| 1667 | and/or tags to fetch on the command line, e.g. <code>git fetch origin</code> |
| 1668 | or <code>git fetch</code>, <code>remote.<repository>.fetch</code> values are used as |
Junio C Hamano | ee61580 | 2015-10-29 21:45:26 | [diff] [blame] | 1669 | the refspecs—they specify which refs to fetch and which local refs |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1670 | to update. The example above will fetch |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1671 | all branches that exist in the <code>origin</code> (i.e. any ref that matches |
| 1672 | the left-hand side of the value, <code>refs/heads/*</code>) and update the |
| 1673 | corresponding remote-tracking branches in the <code>refs/remotes/origin/*</code> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1674 | hierarchy. |
| 1675 | </p> |
| 1676 | </li> |
| 1677 | <li> |
| 1678 | <p> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1679 | When <code>git fetch</code> is run with explicit branches and/or tags |
| 1680 | to fetch on the command line, e.g. <code>git fetch origin master</code>, the |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1681 | <refspec>s given on the command line determine what are to be |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1682 | fetched (e.g. <code>master</code> in the example, |
| 1683 | which is a short-hand for <code>master:</code>, which in turn means |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1684 | "fetch the <em>master</em> branch but I do not explicitly say what |
| 1685 | remote-tracking branch to update with it from the command line"), |
| 1686 | and the example command will |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1687 | fetch <em>only</em> the <em>master</em> branch. The <code>remote.<repository>.fetch</code> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1688 | values determine which |
| 1689 | remote-tracking branch, if any, is updated. When used in this |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1690 | way, the <code>remote.<repository>.fetch</code> values do not have any |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1691 | effect in deciding <em>what</em> gets fetched (i.e. the values are not |
| 1692 | used as refspecs when the command-line lists refspecs); they are |
| 1693 | only used to decide <em>where</em> the refs that are fetched are stored |
| 1694 | by acting as a mapping. |
| 1695 | </p> |
| 1696 | </li> |
| 1697 | </ul></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1698 | <div class="paragraph"><p>The latter use of the <code>remote.<repository>.fetch</code> values can be |
| 1699 | overridden by giving the <code>--refmap=<refspec></code> parameter(s) on the |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1700 | command line.</p></div> |
| 1701 | </div> |
| 1702 | </div> |
| 1703 | <div class="sect1"> |
Junio C Hamano | 664750f | 2018-03-06 23:25:44 | [diff] [blame] | 1704 | <h2 id="_pruning">PRUNING</h2> |
| 1705 | <div class="sectionbody"> |
| 1706 | <div class="paragraph"><p>Git has a default disposition of keeping data unless it’s explicitly |
| 1707 | thrown away; this extends to holding onto local references to branches |
| 1708 | on remotes that have themselves deleted those branches.</p></div> |
| 1709 | <div class="paragraph"><p>If left to accumulate, these stale references might make performance |
| 1710 | worse on big and busy repos that have a lot of branch churn, and |
| 1711 | e.g. make the output of commands like <code>git branch -a --contains |
| 1712 | <commit></code> needlessly verbose, as well as impacting anything else |
| 1713 | that’ll work with the complete set of known references.</p></div> |
| 1714 | <div class="paragraph"><p>These remote-tracking references can be deleted as a one-off with |
| 1715 | either of:</p></div> |
| 1716 | <div class="listingblock"> |
| 1717 | <div class="content"> |
| 1718 | <pre><code># While fetching |
| 1719 | $ git fetch --prune <name> |
| 1720 | |
| 1721 | # Only prune, don't fetch |
| 1722 | $ git remote prune <name></code></pre> |
| 1723 | </div></div> |
| 1724 | <div class="paragraph"><p>To prune references as part of your normal workflow without needing to |
| 1725 | remember to run that, set <code>fetch.prune</code> globally, or |
| 1726 | <code>remote.<name>.prune</code> per-remote in the config. See |
| 1727 | <a href="git-config.html">git-config(1)</a>.</p></div> |
| 1728 | <div class="paragraph"><p>Here’s where things get tricky and more specific. The pruning feature |
Junio C Hamano | 2e5fb40 | 2021-08-04 21:41:11 | [diff] [blame] | 1729 | doesn’t actually care about branches, instead it’ll prune local ←→ |
Junio C Hamano | 664750f | 2018-03-06 23:25:44 | [diff] [blame] | 1730 | remote-references as a function of the refspec of the remote (see |
| 1731 | <code><refspec></code> and <a href="#CRTB">CONFIGURED REMOTE-TRACKING BRANCHES</a> above).</p></div> |
| 1732 | <div class="paragraph"><p>Therefore if the refspec for the remote includes |
| 1733 | e.g. <code>refs/tags/*:refs/tags/*</code>, or you manually run e.g. <code>git fetch |
| 1734 | --prune <name> "refs/tags/*:refs/tags/*"</code> it won’t be stale remote |
| 1735 | tracking branches that are deleted, but any local tag that doesn’t |
| 1736 | exist on the remote.</p></div> |
| 1737 | <div class="paragraph"><p>This might not be what you expect, i.e. you want to prune remote |
| 1738 | <code><name></code>, but also explicitly fetch tags from it, so when you fetch |
| 1739 | from it you delete all your local tags, most of which may not have |
| 1740 | come from the <code><name></code> remote in the first place.</p></div> |
| 1741 | <div class="paragraph"><p>So be careful when using this with a refspec like |
| 1742 | <code>refs/tags/*:refs/tags/*</code>, or any other refspec which might map |
| 1743 | references from multiple remotes to the same local namespace.</p></div> |
| 1744 | <div class="paragraph"><p>Since keeping up-to-date with both branches and tags on the remote is |
| 1745 | a common use-case the <code>--prune-tags</code> option can be supplied along with |
| 1746 | <code>--prune</code> to prune local tags that don’t exist on the remote, and |
| 1747 | force-update those tags that differ. Tag pruning can also be enabled |
| 1748 | with <code>fetch.pruneTags</code> or <code>remote.<name>.pruneTags</code> in the config. See |
| 1749 | <a href="git-config.html">git-config(1)</a>.</p></div> |
| 1750 | <div class="paragraph"><p>The <code>--prune-tags</code> option is equivalent to having |
| 1751 | <code>refs/tags/*:refs/tags/*</code> declared in the refspecs of the remote. This |
| 1752 | can lead to some seemingly strange interactions:</p></div> |
| 1753 | <div class="listingblock"> |
| 1754 | <div class="content"> |
| 1755 | <pre><code># These both fetch tags |
| 1756 | $ git fetch --no-tags origin 'refs/tags/*:refs/tags/*' |
| 1757 | $ git fetch --no-tags --prune-tags origin</code></pre> |
| 1758 | </div></div> |
| 1759 | <div class="paragraph"><p>The reason it doesn’t error out when provided without <code>--prune</code> or its |
| 1760 | config versions is for flexibility of the configured versions, and to |
| 1761 | maintain a 1=1 mapping between what the command line flags do, and |
| 1762 | what the configuration versions do.</p></div> |
| 1763 | <div class="paragraph"><p>It’s reasonable to e.g. configure <code>fetch.pruneTags=true</code> in |
| 1764 | <code>~/.gitconfig</code> to have tags pruned whenever <code>git fetch --prune</code> is |
| 1765 | run, without making every invocation of <code>git fetch</code> without <code>--prune</code> |
| 1766 | an error.</p></div> |
| 1767 | <div class="paragraph"><p>Pruning tags with <code>--prune-tags</code> also works when fetching a URL |
| 1768 | instead of a named remote. These will all prune tags not found on |
| 1769 | origin:</p></div> |
| 1770 | <div class="listingblock"> |
| 1771 | <div class="content"> |
| 1772 | <pre><code>$ git fetch origin --prune --prune-tags |
| 1773 | $ git fetch origin --prune 'refs/tags/*:refs/tags/*' |
| 1774 | $ git fetch <url of origin> --prune --prune-tags |
| 1775 | $ git fetch <url of origin> --prune 'refs/tags/*:refs/tags/*'</code></pre> |
| 1776 | </div></div> |
| 1777 | </div> |
| 1778 | </div> |
| 1779 | <div class="sect1"> |
Junio C Hamano | 1a1b847 | 2016-07-19 21:37:13 | [diff] [blame] | 1780 | <h2 id="_output">OUTPUT</h2> |
| 1781 | <div class="sectionbody"> |
| 1782 | <div class="paragraph"><p>The output of "git fetch" depends on the transport method used; this |
| 1783 | section describes the output when fetching over the Git protocol |
| 1784 | (either locally or via ssh) and Smart HTTP protocol.</p></div> |
| 1785 | <div class="paragraph"><p>The status of the fetch is output in tabular form, with each line |
| 1786 | representing the status of a single ref. Each line is of the form:</p></div> |
| 1787 | <div class="listingblock"> |
| 1788 | <div class="content"> |
| 1789 | <pre><code> <flag> <summary> <from> -> <to> [<reason>]</code></pre> |
| 1790 | </div></div> |
| 1791 | <div class="paragraph"><p>The status of up-to-date refs is shown only if the --verbose option is |
| 1792 | used.</p></div> |
| 1793 | <div class="paragraph"><p>In compact output mode, specified with configuration variable |
| 1794 | fetch.output, if either entire <code><from></code> or <code><to></code> is found in the |
| 1795 | other string, it will be substituted with <code>*</code> in the other string. For |
| 1796 | example, <code>master -> origin/master</code> becomes <code>master -> origin/*</code>.</p></div> |
| 1797 | <div class="dlist"><dl> |
| 1798 | <dt class="hdlist1"> |
| 1799 | flag |
| 1800 | </dt> |
| 1801 | <dd> |
| 1802 | <p> |
| 1803 | A single character indicating the status of the ref: |
| 1804 | </p> |
| 1805 | <div class="dlist"><dl> |
| 1806 | <dt class="hdlist1"> |
| 1807 | (space) |
| 1808 | </dt> |
| 1809 | <dd> |
| 1810 | <p> |
| 1811 | for a successfully fetched fast-forward; |
| 1812 | </p> |
| 1813 | </dd> |
| 1814 | <dt class="hdlist1"> |
| 1815 | <code>+</code> |
| 1816 | </dt> |
| 1817 | <dd> |
| 1818 | <p> |
| 1819 | for a successful forced update; |
| 1820 | </p> |
| 1821 | </dd> |
| 1822 | <dt class="hdlist1"> |
| 1823 | <code>-</code> |
| 1824 | </dt> |
| 1825 | <dd> |
| 1826 | <p> |
| 1827 | for a successfully pruned ref; |
| 1828 | </p> |
| 1829 | </dd> |
| 1830 | <dt class="hdlist1"> |
| 1831 | <code>t</code> |
| 1832 | </dt> |
| 1833 | <dd> |
| 1834 | <p> |
| 1835 | for a successful tag update; |
| 1836 | </p> |
| 1837 | </dd> |
| 1838 | <dt class="hdlist1"> |
| 1839 | <code>*</code> |
| 1840 | </dt> |
| 1841 | <dd> |
| 1842 | <p> |
| 1843 | for a successfully fetched new ref; |
| 1844 | </p> |
| 1845 | </dd> |
| 1846 | <dt class="hdlist1"> |
| 1847 | <code>!</code> |
| 1848 | </dt> |
| 1849 | <dd> |
| 1850 | <p> |
| 1851 | for a ref that was rejected or failed to update; and |
| 1852 | </p> |
| 1853 | </dd> |
| 1854 | <dt class="hdlist1"> |
| 1855 | <code>=</code> |
| 1856 | </dt> |
| 1857 | <dd> |
| 1858 | <p> |
| 1859 | for a ref that was up to date and did not need fetching. |
| 1860 | </p> |
| 1861 | </dd> |
| 1862 | </dl></div> |
| 1863 | </dd> |
| 1864 | <dt class="hdlist1"> |
| 1865 | summary |
| 1866 | </dt> |
| 1867 | <dd> |
| 1868 | <p> |
| 1869 | For a successfully fetched ref, the summary shows the old and new |
| 1870 | values of the ref in a form suitable for using as an argument to |
| 1871 | <code>git log</code> (this is <code><old>..<new></code> in most cases, and |
| 1872 | <code><old>...<new></code> for forced non-fast-forward updates). |
| 1873 | </p> |
| 1874 | </dd> |
| 1875 | <dt class="hdlist1"> |
| 1876 | from |
| 1877 | </dt> |
| 1878 | <dd> |
| 1879 | <p> |
| 1880 | The name of the remote ref being fetched from, minus its |
| 1881 | <code>refs/<type>/</code> prefix. In the case of deletion, the name of |
| 1882 | the remote ref is "(none)". |
| 1883 | </p> |
| 1884 | </dd> |
| 1885 | <dt class="hdlist1"> |
| 1886 | to |
| 1887 | </dt> |
| 1888 | <dd> |
| 1889 | <p> |
| 1890 | The name of the local ref being updated, minus its |
| 1891 | <code>refs/<type>/</code> prefix. |
| 1892 | </p> |
| 1893 | </dd> |
| 1894 | <dt class="hdlist1"> |
| 1895 | reason |
| 1896 | </dt> |
| 1897 | <dd> |
| 1898 | <p> |
| 1899 | A human-readable explanation. In the case of successfully fetched |
| 1900 | refs, no explanation is needed. For a failed ref, the reason for |
| 1901 | failure is described. |
| 1902 | </p> |
| 1903 | </dd> |
| 1904 | </dl></div> |
| 1905 | </div> |
| 1906 | </div> |
| 1907 | <div class="sect1"> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1908 | <h2 id="_examples">EXAMPLES</h2> |
| 1909 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1910 | <div class="ulist"><ul> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1911 | <li> |
| 1912 | <p> |
| 1913 | Update the remote-tracking branches: |
| 1914 | </p> |
| 1915 | <div class="listingblock"> |
| 1916 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1917 | <pre><code>$ git fetch origin</code></pre> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1918 | </div></div> |
Junio C Hamano | a75aada | 2023-01-22 01:54:30 | [diff] [blame] | 1919 | <div class="paragraph"><p>The above command copies all branches from the remote <code>refs/heads/</code> |
| 1920 | namespace and stores them to the local <code>refs/remotes/origin/</code> namespace, |
| 1921 | unless the <code>remote.<repository>.fetch</code> option is used to specify a |
| 1922 | non-default refspec.</p></div> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1923 | </li> |
| 1924 | <li> |
| 1925 | <p> |
| 1926 | Using refspecs explicitly: |
| 1927 | </p> |
| 1928 | <div class="listingblock"> |
| 1929 | <div class="content"> |
Junio C Hamano | a891178 | 2020-07-07 05:35:57 | [diff] [blame] | 1930 | <pre><code>$ git fetch origin +seen:seen maint:tmp</code></pre> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1931 | </div></div> |
Junio C Hamano | a891178 | 2020-07-07 05:35:57 | [diff] [blame] | 1932 | <div class="paragraph"><p>This updates (or creates, as necessary) branches <code>seen</code> and <code>tmp</code> in |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1933 | the local repository by fetching from the branches (respectively) |
Junio C Hamano | a891178 | 2020-07-07 05:35:57 | [diff] [blame] | 1934 | <code>seen</code> and <code>maint</code> from the remote repository.</p></div> |
| 1935 | <div class="paragraph"><p>The <code>seen</code> branch will be updated even if it does not fast-forward, |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1936 | because it is prefixed with a plus sign; <code>tmp</code> will not be.</p></div> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1937 | </li> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1938 | <li> |
| 1939 | <p> |
| 1940 | Peek at a remote’s branch, without configuring the remote in your local |
Junio C Hamano | 2567b32 | 2019-02-05 23:33:56 | [diff] [blame] | 1941 | repository: |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1942 | </p> |
| 1943 | <div class="listingblock"> |
| 1944 | <div class="content"> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1945 | <pre><code>$ git fetch git://git.kernel.org/pub/scm/git/git.git maint |
| 1946 | $ git log FETCH_HEAD</code></pre> |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1947 | </div></div> |
Junio C Hamano | c14e6ad | 2014-10-31 20:25:53 | [diff] [blame] | 1948 | <div class="paragraph"><p>The first command fetches the <code>maint</code> branch from the repository at |
| 1949 | <code>git://git.kernel.org/pub/scm/git/git.git</code> and the second command uses |
| 1950 | <code>FETCH_HEAD</code> to examine the branch with <a href="git-log.html">git-log(1)</a>. The fetched |
Junio C Hamano | 45f804f | 2014-06-20 22:24:49 | [diff] [blame] | 1951 | objects will eventually be removed by git’s built-in housekeeping (see |
| 1952 | <a href="git-gc.html">git-gc(1)</a>).</p></div> |
| 1953 | </li> |
Junio C Hamano | c21ab05 | 2009-10-31 04:03:55 | [diff] [blame] | 1954 | </ul></div> |
| 1955 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1956 | </div> |
| 1957 | <div class="sect1"> |
Junio C Hamano | 56ace3d | 2017-01-10 23:43:41 | [diff] [blame] | 1958 | <h2 id="_security">SECURITY</h2> |
| 1959 | <div class="sectionbody"> |
| 1960 | <div class="paragraph"><p>The fetch and push protocols are not designed to prevent one side from |
| 1961 | stealing data from the other repository that was not intended to be |
| 1962 | shared. If you have private data that you need to protect from a malicious |
| 1963 | peer, your best option is to store it in another repository. This applies |
| 1964 | to both clients and servers. In particular, namespaces on a server are not |
| 1965 | effective for read access control; you should only grant read access to a |
| 1966 | namespace to clients that you would trust with read access to the entire |
| 1967 | repository.</p></div> |
| 1968 | <div class="paragraph"><p>The known attack vectors are as follows:</p></div> |
| 1969 | <div class="olist arabic"><ol class="arabic"> |
| 1970 | <li> |
| 1971 | <p> |
| 1972 | The victim sends "have" lines advertising the IDs of objects it has that |
| 1973 | are not explicitly intended to be shared but can be used to optimize the |
| 1974 | transfer if the peer also has them. The attacker chooses an object ID X |
| 1975 | to steal and sends a ref to X, but isn’t required to send the content of |
| 1976 | X because the victim already has it. Now the victim believes that the |
| 1977 | attacker has X, and it sends the content of X back to the attacker |
| 1978 | later. (This attack is most straightforward for a client to perform on a |
| 1979 | server, by creating a ref to X in the namespace the client has access |
| 1980 | to and then fetching it. The most likely way for a server to perform it |
| 1981 | on a client is to "merge" X into a public branch and hope that the user |
| 1982 | does additional work on this branch and pushes it back to the server |
| 1983 | without noticing the merge.) |
| 1984 | </p> |
| 1985 | </li> |
| 1986 | <li> |
| 1987 | <p> |
| 1988 | As in #1, the attacker chooses an object ID X to steal. The victim sends |
| 1989 | an object Y that the attacker already has, and the attacker falsely |
| 1990 | claims to have X and not Y, so the victim sends Y as a delta against X. |
| 1991 | The delta reveals regions of X that are similar to Y to the attacker. |
| 1992 | </p> |
| 1993 | </li> |
| 1994 | </ol></div> |
| 1995 | </div> |
| 1996 | </div> |
| 1997 | <div class="sect1"> |
Junio C Hamano | ba8baee | 2022-09-14 20:25:23 | [diff] [blame] | 1998 | <h2 id="_configuration">CONFIGURATION</h2> |
| 1999 | <div class="sectionbody"> |
| 2000 | <div class="paragraph"><p>Everything below this line in this section is selectively included |
| 2001 | from the <a href="git-config.html">git-config(1)</a> documentation. The content is the same |
| 2002 | as what’s found there:</p></div> |
| 2003 | <div class="dlist"><dl> |
| 2004 | <dt class="hdlist1"> |
| 2005 | fetch.recurseSubmodules |
| 2006 | </dt> |
| 2007 | <dd> |
| 2008 | <p> |
| 2009 | This option controls whether <code>git fetch</code> (and the underlying fetch |
| 2010 | in <code>git pull</code>) will recursively fetch into populated submodules. |
| 2011 | This option can be set either to a boolean value or to <em>on-demand</em>. |
| 2012 | Setting it to a boolean changes the behavior of fetch and pull to |
| 2013 | recurse unconditionally into submodules when set to true or to not |
| 2014 | recurse at all when set to false. When set to <em>on-demand</em>, fetch and |
| 2015 | pull will only recurse into a populated submodule when its |
| 2016 | superproject retrieves a commit that updates the submodule’s |
| 2017 | reference. |
| 2018 | Defaults to <em>on-demand</em>, or to the value of <em>submodule.recurse</em> if set. |
| 2019 | </p> |
| 2020 | </dd> |
| 2021 | <dt class="hdlist1"> |
| 2022 | fetch.fsckObjects |
| 2023 | </dt> |
| 2024 | <dd> |
| 2025 | <p> |
| 2026 | If it is set to true, git-fetch-pack will check all fetched |
| 2027 | objects. See <code>transfer.fsckObjects</code> for what’s |
| 2028 | checked. Defaults to false. If not set, the value of |
| 2029 | <code>transfer.fsckObjects</code> is used instead. |
| 2030 | </p> |
| 2031 | </dd> |
| 2032 | <dt class="hdlist1"> |
| 2033 | fetch.fsck.<msg-id> |
| 2034 | </dt> |
| 2035 | <dd> |
| 2036 | <p> |
| 2037 | Acts like <code>fsck.<msg-id></code>, but is used by |
| 2038 | <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See |
| 2039 | the <code>fsck.<msg-id></code> documentation for details. |
| 2040 | </p> |
| 2041 | </dd> |
| 2042 | <dt class="hdlist1"> |
| 2043 | fetch.fsck.skipList |
| 2044 | </dt> |
| 2045 | <dd> |
| 2046 | <p> |
| 2047 | Acts like <code>fsck.skipList</code>, but is used by |
| 2048 | <a href="git-fetch-pack.html">git-fetch-pack(1)</a> instead of <a href="git-fsck.html">git-fsck(1)</a>. See |
| 2049 | the <code>fsck.skipList</code> documentation for details. |
| 2050 | </p> |
| 2051 | </dd> |
| 2052 | <dt class="hdlist1"> |
| 2053 | fetch.unpackLimit |
| 2054 | </dt> |
| 2055 | <dd> |
| 2056 | <p> |
| 2057 | If the number of objects fetched over the Git native |
| 2058 | transfer is below this |
| 2059 | limit, then the objects will be unpacked into loose object |
| 2060 | files. However if the number of received objects equals or |
| 2061 | exceeds this limit then the received pack will be stored as |
| 2062 | a pack, after adding any missing delta bases. Storing the |
| 2063 | pack from a push can make the push operation complete faster, |
| 2064 | especially on slow filesystems. If not set, the value of |
| 2065 | <code>transfer.unpackLimit</code> is used instead. |
| 2066 | </p> |
| 2067 | </dd> |
| 2068 | <dt class="hdlist1"> |
| 2069 | fetch.prune |
| 2070 | </dt> |
| 2071 | <dd> |
| 2072 | <p> |
| 2073 | If true, fetch will automatically behave as if the <code>--prune</code> |
| 2074 | option was given on the command line. See also <code>remote.<name>.prune</code> |
| 2075 | and the PRUNING section of <a href="git-fetch.html">git-fetch(1)</a>. |
| 2076 | </p> |
| 2077 | </dd> |
| 2078 | <dt class="hdlist1"> |
| 2079 | fetch.pruneTags |
| 2080 | </dt> |
| 2081 | <dd> |
| 2082 | <p> |
| 2083 | If true, fetch will automatically behave as if the |
| 2084 | <code>refs/tags/*:refs/tags/*</code> refspec was provided when pruning, |
| 2085 | if not set already. This allows for setting both this option |
| 2086 | and <code>fetch.prune</code> to maintain a 1=1 mapping to upstream |
| 2087 | refs. See also <code>remote.<name>.pruneTags</code> and the PRUNING |
| 2088 | section of <a href="git-fetch.html">git-fetch(1)</a>. |
| 2089 | </p> |
| 2090 | </dd> |
| 2091 | <dt class="hdlist1"> |
| 2092 | fetch.output |
| 2093 | </dt> |
| 2094 | <dd> |
| 2095 | <p> |
| 2096 | Control how ref update status is printed. Valid values are |
| 2097 | <code>full</code> and <code>compact</code>. Default value is <code>full</code>. See section |
| 2098 | OUTPUT in <a href="git-fetch.html">git-fetch(1)</a> for detail. |
| 2099 | </p> |
| 2100 | </dd> |
| 2101 | <dt class="hdlist1"> |
| 2102 | fetch.negotiationAlgorithm |
| 2103 | </dt> |
| 2104 | <dd> |
| 2105 | <p> |
| 2106 | Control how information about the commits in the local repository |
| 2107 | is sent when negotiating the contents of the packfile to be sent by |
| 2108 | the server. Set to "consecutive" to use an algorithm that walks |
| 2109 | over consecutive commits checking each one. Set to "skipping" to |
| 2110 | use an algorithm that skips commits in an effort to converge |
| 2111 | faster, but may result in a larger-than-necessary packfile; or set |
| 2112 | to "noop" to not send any information at all, which will almost |
| 2113 | certainly result in a larger-than-necessary packfile, but will skip |
| 2114 | the negotiation step. Set to "default" to override settings made |
| 2115 | previously and use the default behaviour. The default is normally |
| 2116 | "consecutive", but if <code>feature.experimental</code> is true, then the |
| 2117 | default is "skipping". Unknown values will cause <em>git fetch</em> to |
| 2118 | error out. |
| 2119 | </p> |
| 2120 | <div class="paragraph"><p>See also the <code>--negotiate-only</code> and <code>--negotiation-tip</code> options to |
| 2121 | <a href="git-fetch.html">git-fetch(1)</a>.</p></div> |
| 2122 | </dd> |
| 2123 | <dt class="hdlist1"> |
| 2124 | fetch.showForcedUpdates |
| 2125 | </dt> |
| 2126 | <dd> |
| 2127 | <p> |
| 2128 | Set to false to enable <code>--no-show-forced-updates</code> in |
| 2129 | <a href="git-fetch.html">git-fetch(1)</a> and <a href="git-pull.html">git-pull(1)</a> commands. |
| 2130 | Defaults to true. |
| 2131 | </p> |
| 2132 | </dd> |
| 2133 | <dt class="hdlist1"> |
| 2134 | fetch.parallel |
| 2135 | </dt> |
| 2136 | <dd> |
| 2137 | <p> |
| 2138 | Specifies the maximal number of fetch operations to be run in parallel |
| 2139 | at a time (submodules, or remotes when the <code>--multiple</code> option of |
| 2140 | <a href="git-fetch.html">git-fetch(1)</a> is in effect). |
| 2141 | </p> |
| 2142 | <div class="paragraph"><p>A value of 0 will give some reasonable default. If unset, it defaults to 1.</p></div> |
| 2143 | <div class="paragraph"><p>For submodules, this setting can be overridden using the <code>submodule.fetchJobs</code> |
| 2144 | config setting.</p></div> |
| 2145 | </dd> |
| 2146 | <dt class="hdlist1"> |
| 2147 | fetch.writeCommitGraph |
| 2148 | </dt> |
| 2149 | <dd> |
| 2150 | <p> |
| 2151 | Set to true to write a commit-graph after every <code>git fetch</code> command |
| 2152 | that downloads a pack-file from a remote. Using the <code>--split</code> option, |
| 2153 | most executions will create a very small commit-graph file on top of |
| 2154 | the existing commit-graph file(s). Occasionally, these files will |
| 2155 | merge and the write may take longer. Having an updated commit-graph |
| 2156 | file helps performance of many Git commands, including <code>git merge-base</code>, |
| 2157 | <code>git push -f</code>, and <code>git log --graph</code>. Defaults to false. |
| 2158 | </p> |
| 2159 | </dd> |
Junio C Hamano | 3583c5c | 2023-02-22 23:31:59 | [diff] [blame] | 2160 | <dt class="hdlist1"> |
| 2161 | fetch.bundleURI |
| 2162 | </dt> |
| 2163 | <dd> |
| 2164 | <p> |
| 2165 | This value stores a URI for downloading Git object data from a bundle |
| 2166 | URI before performing an incremental fetch from the origin Git server. |
| 2167 | This is similar to how the <code>--bundle-uri</code> option behaves in |
| 2168 | <a href="git-clone.html">git-clone(1)</a>. <code>git clone --bundle-uri</code> will set the |
| 2169 | <code>fetch.bundleURI</code> value if the supplied bundle URI contains a bundle |
| 2170 | list that is organized for incremental fetches. |
| 2171 | </p> |
| 2172 | <div class="paragraph"><p>If you modify this value and your repository has a <code>fetch.bundleCreationToken</code> |
| 2173 | value, then remove that <code>fetch.bundleCreationToken</code> value before fetching from |
| 2174 | the new bundle URI.</p></div> |
| 2175 | </dd> |
| 2176 | <dt class="hdlist1"> |
| 2177 | fetch.bundleCreationToken |
| 2178 | </dt> |
| 2179 | <dd> |
| 2180 | <p> |
| 2181 | When using <code>fetch.bundleURI</code> to fetch incrementally from a bundle |
| 2182 | list that uses the "creationToken" heuristic, this config value |
| 2183 | stores the maximum <code>creationToken</code> value of the downloaded bundles. |
| 2184 | This value is used to prevent downloading bundles in the future |
| 2185 | if the advertised <code>creationToken</code> is not strictly larger than this |
| 2186 | value. |
| 2187 | </p> |
| 2188 | <div class="paragraph"><p>The creation token values are chosen by the provider serving the specific |
| 2189 | bundle URI. If you modify the URI at <code>fetch.bundleURI</code>, then be sure to |
| 2190 | remove the value for the <code>fetch.bundleCreationToken</code> value before fetching.</p></div> |
| 2191 | </dd> |
Junio C Hamano | ba8baee | 2022-09-14 20:25:23 | [diff] [blame] | 2192 | </dl></div> |
| 2193 | </div> |
| 2194 | </div> |
| 2195 | <div class="sect1"> |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 2196 | <h2 id="_bugs">BUGS</h2> |
| 2197 | <div class="sectionbody"> |
Junio C Hamano | 67fef49 | 2022-03-27 17:31:23 | [diff] [blame] | 2198 | <div class="paragraph"><p>Using --recurse-submodules can only fetch new commits in submodules that are |
| 2199 | present locally e.g. in <code>$GIT_DIR/modules/</code>. If the upstream adds a new |
| 2200 | submodule, that submodule cannot be fetched until it is cloned e.g. by <code>git |
| 2201 | submodule update</code>. This is expected to be fixed in a future Git version.</p></div> |
Junio C Hamano | 5cd1518 | 2011-04-05 00:21:10 | [diff] [blame] | 2202 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 2203 | </div> |
| 2204 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2205 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2206 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2207 | <div class="paragraph"><p><a href="git-pull.html">git-pull(1)</a></p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2208 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 2209 | </div> |
| 2210 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2211 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2212 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2213 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2214 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 2215 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 2216 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 2217 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2218 | <div id="footer"> |
| 2219 | <div id="footer-text"> |
Junio C Hamano | 2ef0ba3 | 2018-01-26 23:13:53 | [diff] [blame] | 2220 | Last updated |
Junio C Hamano | a75aada | 2023-01-22 01:54:30 | [diff] [blame] | 2221 | 2023-01-21 17:52:14 PST |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 2222 | </div> |
| 2223 | </div> |
| 2224 | </body> |
| 2225 | </html> |