Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
| 2 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 4 | <head> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 5 | <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> |
| 6 | <meta name="generator" content="AsciiDoc 8.6.8" /> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 7 | <title>git-clone(1)</title> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 8 | <style type="text/css"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 9 | /* Shared CSS for AsciiDoc xhtml11 and html5 backends */ |
| 10 | |
| 11 | /* Default font. */ |
| 12 | body { |
| 13 | font-family: Georgia,serif; |
| 14 | } |
| 15 | |
| 16 | /* Title font. */ |
| 17 | h1, h2, h3, h4, h5, h6, |
| 18 | div.title, caption.title, |
| 19 | thead, p.table.header, |
| 20 | #toctitle, |
| 21 | #author, #revnumber, #revdate, #revremark, |
| 22 | #footer { |
| 23 | font-family: Arial,Helvetica,sans-serif; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | body { |
| 27 | margin: 1em 5% 1em 5%; |
| 28 | } |
| 29 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 30 | a { |
| 31 | color: blue; |
| 32 | text-decoration: underline; |
| 33 | } |
| 34 | a:visited { |
| 35 | color: fuchsia; |
| 36 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 37 | |
| 38 | em { |
| 39 | font-style: italic; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 40 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | strong { |
| 44 | font-weight: bold; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 45 | color: #083194; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 46 | } |
| 47 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | h1, h2, h3, h4, h5, h6 { |
| 49 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 50 | margin-top: 1.2em; |
| 51 | margin-bottom: 0.5em; |
| 52 | line-height: 1.3; |
| 53 | } |
| 54 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 55 | h1, h2, h3 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 56 | border-bottom: 2px solid silver; |
| 57 | } |
| 58 | h2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 59 | padding-top: 0.5em; |
| 60 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 61 | h3 { |
| 62 | float: left; |
| 63 | } |
| 64 | h3 + * { |
| 65 | clear: left; |
| 66 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 67 | h5 { |
| 68 | font-size: 1.0em; |
| 69 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 70 | |
| 71 | div.sectionbody { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 72 | margin-left: 0; |
| 73 | } |
| 74 | |
| 75 | hr { |
| 76 | border: 1px solid silver; |
| 77 | } |
| 78 | |
| 79 | p { |
| 80 | margin-top: 0.5em; |
| 81 | margin-bottom: 0.5em; |
| 82 | } |
| 83 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 84 | ul, ol, li > p { |
| 85 | margin-top: 0; |
| 86 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 87 | ul > li { color: #aaa; } |
| 88 | ul > li > * { color: black; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 89 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 90 | .monospaced, code, pre { |
| 91 | font-family: "Courier New", Courier, monospace; |
| 92 | font-size: inherit; |
| 93 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 94 | padding: 0; |
| 95 | margin: 0; |
| 96 | } |
| 97 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 98 | |
| 99 | #author { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 100 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 101 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 102 | font-size: 1.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 103 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 104 | #email { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 105 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 106 | #revnumber, #revdate, #revremark { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 107 | } |
| 108 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 109 | #footer { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 110 | font-size: small; |
| 111 | border-top: 2px solid silver; |
| 112 | padding-top: 0.5em; |
| 113 | margin-top: 4.0em; |
| 114 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 115 | #footer-text { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 116 | float: left; |
| 117 | padding-bottom: 0.5em; |
| 118 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 119 | #footer-badges { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 120 | float: right; |
| 121 | padding-bottom: 0.5em; |
| 122 | } |
| 123 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 124 | #preamble { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 125 | margin-top: 1.5em; |
| 126 | margin-bottom: 1.5em; |
| 127 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 128 | div.imageblock, div.exampleblock, div.verseblock, |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 129 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 130 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 131 | margin-top: 1.0em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 132 | margin-bottom: 1.5em; |
| 133 | } |
| 134 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 135 | margin-top: 2.0em; |
| 136 | margin-bottom: 2.0em; |
| 137 | margin-right: 10%; |
| 138 | color: #606060; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | div.content { /* Block element content. */ |
| 142 | padding: 0; |
| 143 | } |
| 144 | |
| 145 | /* Block element titles. */ |
| 146 | div.title, caption.title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 147 | color: #527bbd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 148 | font-weight: bold; |
| 149 | text-align: left; |
| 150 | margin-top: 1.0em; |
| 151 | margin-bottom: 0.5em; |
| 152 | } |
| 153 | div.title + * { |
| 154 | margin-top: 0; |
| 155 | } |
| 156 | |
| 157 | td div.title:first-child { |
| 158 | margin-top: 0.0em; |
| 159 | } |
| 160 | div.content div.title:first-child { |
| 161 | margin-top: 0.0em; |
| 162 | } |
| 163 | div.content + div.title { |
| 164 | margin-top: 0.0em; |
| 165 | } |
| 166 | |
| 167 | div.sidebarblock > div.content { |
| 168 | background: #ffffee; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 169 | border: 1px solid #dddddd; |
| 170 | border-left: 4px solid #f0f0f0; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 171 | padding: 0.5em; |
| 172 | } |
| 173 | |
| 174 | div.listingblock > div.content { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 175 | border: 1px solid #dddddd; |
| 176 | border-left: 5px solid #f0f0f0; |
| 177 | background: #f8f8f8; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 178 | padding: 0.5em; |
| 179 | } |
| 180 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 181 | div.quoteblock, div.verseblock { |
| 182 | padding-left: 1.0em; |
| 183 | margin-left: 1.0em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 184 | margin-right: 10%; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 185 | border-left: 5px solid #f0f0f0; |
| 186 | color: #888; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 187 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 188 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 189 | div.quoteblock > div.attribution { |
| 190 | padding-top: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 191 | text-align: right; |
| 192 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 193 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 194 | div.verseblock > pre.content { |
| 195 | font-family: inherit; |
| 196 | font-size: inherit; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 197 | } |
| 198 | div.verseblock > div.attribution { |
| 199 | padding-top: 0.75em; |
| 200 | text-align: left; |
| 201 | } |
| 202 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 203 | div.verseblock + div.attribution { |
| 204 | text-align: left; |
| 205 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 206 | |
| 207 | div.admonitionblock .icon { |
| 208 | vertical-align: top; |
| 209 | font-size: 1.1em; |
| 210 | font-weight: bold; |
| 211 | text-decoration: underline; |
| 212 | color: #527bbd; |
| 213 | padding-right: 0.5em; |
| 214 | } |
| 215 | div.admonitionblock td.content { |
| 216 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 217 | border-left: 3px solid #dddddd; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 218 | } |
| 219 | |
| 220 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 221 | border-left: 3px solid #dddddd; |
| 222 | padding-left: 0.5em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 223 | } |
| 224 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 225 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 226 | span.image img { border-style: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 227 | a.image:visited { color: white; } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 228 | |
| 229 | dl { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
| 233 | dt { |
| 234 | margin-top: 0.5em; |
| 235 | margin-bottom: 0; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 236 | font-style: normal; |
| 237 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 238 | } |
| 239 | dd > *:first-child { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 240 | margin-top: 0.1em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 241 | } |
| 242 | |
| 243 | ul, ol { |
| 244 | list-style-position: outside; |
| 245 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 246 | ol.arabic { |
| 247 | list-style-type: decimal; |
| 248 | } |
| 249 | ol.loweralpha { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 250 | list-style-type: lower-alpha; |
| 251 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 252 | ol.upperalpha { |
| 253 | list-style-type: upper-alpha; |
| 254 | } |
| 255 | ol.lowerroman { |
| 256 | list-style-type: lower-roman; |
| 257 | } |
| 258 | ol.upperroman { |
| 259 | list-style-type: upper-roman; |
| 260 | } |
| 261 | |
| 262 | div.compact ul, div.compact ol, |
| 263 | div.compact p, div.compact p, |
| 264 | div.compact div, div.compact div { |
| 265 | margin-top: 0.1em; |
| 266 | margin-bottom: 0.1em; |
| 267 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 268 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 269 | tfoot { |
| 270 | font-weight: bold; |
| 271 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 272 | td > div.verse { |
| 273 | white-space: pre; |
| 274 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 275 | |
| 276 | div.hdlist { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 277 | margin-top: 0.8em; |
| 278 | margin-bottom: 0.8em; |
| 279 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 280 | div.hdlist tr { |
| 281 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 282 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 283 | dt.hdlist1.strong, td.hdlist1.strong { |
| 284 | font-weight: bold; |
| 285 | } |
| 286 | td.hdlist1 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 287 | vertical-align: top; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 288 | font-style: normal; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 289 | padding-right: 0.8em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 290 | color: navy; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 291 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 292 | td.hdlist2 { |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 293 | vertical-align: top; |
| 294 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 295 | div.hdlist.compact tr { |
| 296 | margin: 0; |
| 297 | padding-bottom: 0; |
| 298 | } |
| 299 | |
| 300 | .comment { |
| 301 | background: yellow; |
| 302 | } |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 303 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 304 | .footnote, .footnoteref { |
| 305 | font-size: 0.8em; |
| 306 | } |
| 307 | |
| 308 | span.footnote, span.footnoteref { |
| 309 | vertical-align: super; |
| 310 | } |
| 311 | |
| 312 | #footnotes { |
| 313 | margin: 20px 0 20px 0; |
| 314 | padding: 7px 0 0 0; |
| 315 | } |
| 316 | |
| 317 | #footnotes div.footnote { |
| 318 | margin: 0 0 5px 0; |
| 319 | } |
| 320 | |
| 321 | #footnotes hr { |
| 322 | border: none; |
| 323 | border-top: 1px solid silver; |
| 324 | height: 1px; |
| 325 | text-align: left; |
| 326 | margin-left: 0; |
| 327 | width: 20%; |
| 328 | min-width: 100px; |
| 329 | } |
| 330 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 331 | div.colist td { |
| 332 | padding-right: 0.5em; |
| 333 | padding-bottom: 0.3em; |
| 334 | vertical-align: top; |
| 335 | } |
| 336 | div.colist td img { |
| 337 | margin-top: 0.3em; |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 338 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 340 | @media print { |
| 341 | #footer-badges { display: none; } |
| 342 | } |
| 343 | |
| 344 | #toc { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 345 | margin-bottom: 2.5em; |
| 346 | } |
| 347 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 348 | #toctitle { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 349 | color: #527bbd; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 350 | font-size: 1.1em; |
| 351 | font-weight: bold; |
| 352 | margin-top: 1.0em; |
| 353 | margin-bottom: 0.1em; |
| 354 | } |
| 355 | |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 356 | div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 357 | margin-top: 0; |
| 358 | margin-bottom: 0; |
| 359 | } |
| 360 | div.toclevel2 { |
| 361 | margin-left: 2em; |
| 362 | font-size: 0.9em; |
| 363 | } |
| 364 | div.toclevel3 { |
| 365 | margin-left: 4em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel4 { |
| 369 | margin-left: 6em; |
| 370 | font-size: 0.9em; |
| 371 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 372 | |
| 373 | span.aqua { color: aqua; } |
| 374 | span.black { color: black; } |
| 375 | span.blue { color: blue; } |
| 376 | span.fuchsia { color: fuchsia; } |
| 377 | span.gray { color: gray; } |
| 378 | span.green { color: green; } |
| 379 | span.lime { color: lime; } |
| 380 | span.maroon { color: maroon; } |
| 381 | span.navy { color: navy; } |
| 382 | span.olive { color: olive; } |
| 383 | span.purple { color: purple; } |
| 384 | span.red { color: red; } |
| 385 | span.silver { color: silver; } |
| 386 | span.teal { color: teal; } |
| 387 | span.white { color: white; } |
| 388 | span.yellow { color: yellow; } |
| 389 | |
| 390 | span.aqua-background { background: aqua; } |
| 391 | span.black-background { background: black; } |
| 392 | span.blue-background { background: blue; } |
| 393 | span.fuchsia-background { background: fuchsia; } |
| 394 | span.gray-background { background: gray; } |
| 395 | span.green-background { background: green; } |
| 396 | span.lime-background { background: lime; } |
| 397 | span.maroon-background { background: maroon; } |
| 398 | span.navy-background { background: navy; } |
| 399 | span.olive-background { background: olive; } |
| 400 | span.purple-background { background: purple; } |
| 401 | span.red-background { background: red; } |
| 402 | span.silver-background { background: silver; } |
| 403 | span.teal-background { background: teal; } |
| 404 | span.white-background { background: white; } |
| 405 | span.yellow-background { background: yellow; } |
| 406 | |
| 407 | span.big { font-size: 2em; } |
| 408 | span.small { font-size: 0.6em; } |
| 409 | |
| 410 | span.underline { text-decoration: underline; } |
| 411 | span.overline { text-decoration: overline; } |
| 412 | span.line-through { text-decoration: line-through; } |
| 413 | |
| 414 | div.unbreakable { page-break-inside: avoid; } |
| 415 | |
| 416 | |
| 417 | /* |
| 418 | * xhtml11 specific |
| 419 | * |
| 420 | * */ |
| 421 | |
| 422 | div.tableblock { |
| 423 | margin-top: 1.0em; |
| 424 | margin-bottom: 1.5em; |
| 425 | } |
| 426 | div.tableblock > table { |
| 427 | border: 3px solid #527bbd; |
| 428 | } |
| 429 | thead, p.table.header { |
| 430 | font-weight: bold; |
| 431 | color: #527bbd; |
| 432 | } |
| 433 | p.table { |
| 434 | margin-top: 0; |
| 435 | } |
| 436 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 437 | div.tableblock > table[frame="void"] { |
| 438 | border-style: none; |
| 439 | } |
| 440 | div.tableblock > table[frame="hsides"] { |
| 441 | border-left-style: none; |
| 442 | border-right-style: none; |
| 443 | } |
| 444 | div.tableblock > table[frame="vsides"] { |
| 445 | border-top-style: none; |
| 446 | border-bottom-style: none; |
| 447 | } |
| 448 | |
| 449 | |
| 450 | /* |
| 451 | * html5 specific |
| 452 | * |
| 453 | * */ |
| 454 | |
| 455 | table.tableblock { |
| 456 | margin-top: 1.0em; |
| 457 | margin-bottom: 1.5em; |
| 458 | } |
| 459 | thead, p.tableblock.header { |
| 460 | font-weight: bold; |
| 461 | color: #527bbd; |
| 462 | } |
| 463 | p.tableblock { |
| 464 | margin-top: 0; |
| 465 | } |
| 466 | table.tableblock { |
| 467 | border-width: 3px; |
| 468 | border-spacing: 0px; |
| 469 | border-style: solid; |
| 470 | border-color: #527bbd; |
| 471 | border-collapse: collapse; |
| 472 | } |
| 473 | th.tableblock, td.tableblock { |
| 474 | border-width: 1px; |
| 475 | padding: 4px; |
| 476 | border-style: solid; |
| 477 | border-color: #527bbd; |
| 478 | } |
| 479 | |
| 480 | table.tableblock.frame-topbot { |
| 481 | border-left-style: hidden; |
| 482 | border-right-style: hidden; |
| 483 | } |
| 484 | table.tableblock.frame-sides { |
| 485 | border-top-style: hidden; |
| 486 | border-bottom-style: hidden; |
| 487 | } |
| 488 | table.tableblock.frame-none { |
| 489 | border-style: hidden; |
| 490 | } |
| 491 | |
| 492 | th.tableblock.halign-left, td.tableblock.halign-left { |
| 493 | text-align: left; |
| 494 | } |
| 495 | th.tableblock.halign-center, td.tableblock.halign-center { |
| 496 | text-align: center; |
| 497 | } |
| 498 | th.tableblock.halign-right, td.tableblock.halign-right { |
| 499 | text-align: right; |
| 500 | } |
| 501 | |
| 502 | th.tableblock.valign-top, td.tableblock.valign-top { |
| 503 | vertical-align: top; |
| 504 | } |
| 505 | th.tableblock.valign-middle, td.tableblock.valign-middle { |
| 506 | vertical-align: middle; |
| 507 | } |
| 508 | th.tableblock.valign-bottom, td.tableblock.valign-bottom { |
| 509 | vertical-align: bottom; |
| 510 | } |
| 511 | |
| 512 | |
| 513 | /* |
| 514 | * manpage specific |
| 515 | * |
| 516 | * */ |
| 517 | |
| 518 | body.manpage h1 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 519 | padding-top: 0.5em; |
| 520 | padding-bottom: 0.5em; |
| 521 | border-top: 2px solid silver; |
| 522 | border-bottom: 2px solid silver; |
| 523 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 524 | body.manpage h2 { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 525 | border-style: none; |
| 526 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 527 | body.manpage div.sectionbody { |
| 528 | margin-left: 3em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 529 | } |
| 530 | |
| 531 | @media print { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 532 | body.manpage div#toc { display: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 533 | } |
| 534 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 535 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 536 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 537 | <script type="text/javascript"> |
| 538 | /*<![CDATA[*/ |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 539 | var asciidoc = { // Namespace. |
| 540 | |
| 541 | ///////////////////////////////////////////////////////////////////// |
| 542 | // Table Of Contents generator |
| 543 | ///////////////////////////////////////////////////////////////////// |
| 544 | |
| 545 | /* Author: Mihai Bazon, September 2002 |
| 546 | * http://students.infoiasi.ro/~mishoo |
| 547 | * |
| 548 | * Table Of Content generator |
| 549 | * Version: 0.4 |
| 550 | * |
| 551 | * Feel free to use this script under the terms of the GNU General Public |
| 552 | * License, as long as you do not remove or alter this notice. |
| 553 | */ |
| 554 | |
| 555 | /* modified by Troy D. Hanson, September 2006. License: GPL */ |
| 556 | /* modified by Stuart Rackham, 2006, 2009. License: GPL */ |
| 557 | |
| 558 | // toclevels = 1..4. |
| 559 | toc: function (toclevels) { |
| 560 | |
| 561 | function getText(el) { |
| 562 | var text = ""; |
| 563 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 564 | if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. |
| 565 | text += i.data; |
| 566 | else if (i.firstChild != null) |
| 567 | text += getText(i); |
| 568 | } |
| 569 | return text; |
| 570 | } |
| 571 | |
| 572 | function TocEntry(el, text, toclevel) { |
| 573 | this.element = el; |
| 574 | this.text = text; |
| 575 | this.toclevel = toclevel; |
| 576 | } |
| 577 | |
| 578 | function tocEntries(el, toclevels) { |
| 579 | var result = new Array; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 580 | var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 581 | // Function that scans the DOM tree for header elements (the DOM2 |
| 582 | // nodeIterator API would be a better technique but not supported by all |
| 583 | // browsers). |
| 584 | var iterate = function (el) { |
| 585 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 586 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 587 | var mo = re.exec(i.tagName); |
| 588 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 589 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 590 | } |
| 591 | iterate(i); |
| 592 | } |
| 593 | } |
| 594 | } |
| 595 | iterate(el); |
| 596 | return result; |
| 597 | } |
| 598 | |
| 599 | var toc = document.getElementById("toc"); |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 600 | if (!toc) { |
| 601 | return; |
| 602 | } |
| 603 | |
| 604 | // Delete existing TOC entries in case we're reloading the TOC. |
| 605 | var tocEntriesToRemove = []; |
| 606 | var i; |
| 607 | for (i = 0; i < toc.childNodes.length; i++) { |
| 608 | var entry = toc.childNodes[i]; |
| 609 | if (entry.nodeName.toLowerCase() == 'div' |
| 610 | && entry.getAttribute("class") |
| 611 | && entry.getAttribute("class").match(/^toclevel/)) |
| 612 | tocEntriesToRemove.push(entry); |
| 613 | } |
| 614 | for (i = 0; i < tocEntriesToRemove.length; i++) { |
| 615 | toc.removeChild(tocEntriesToRemove[i]); |
| 616 | } |
| 617 | |
| 618 | // Rebuild TOC entries. |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 619 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 620 | for (var i = 0; i < entries.length; ++i) { |
| 621 | var entry = entries[i]; |
| 622 | if (entry.element.id == "") |
| 623 | entry.element.id = "_toc_" + i; |
| 624 | var a = document.createElement("a"); |
| 625 | a.href = "#" + entry.element.id; |
| 626 | a.appendChild(document.createTextNode(entry.text)); |
| 627 | var div = document.createElement("div"); |
| 628 | div.appendChild(a); |
| 629 | div.className = "toclevel" + entry.toclevel; |
| 630 | toc.appendChild(div); |
| 631 | } |
| 632 | if (entries.length == 0) |
| 633 | toc.parentNode.removeChild(toc); |
| 634 | }, |
| 635 | |
| 636 | |
| 637 | ///////////////////////////////////////////////////////////////////// |
| 638 | // Footnotes generator |
| 639 | ///////////////////////////////////////////////////////////////////// |
| 640 | |
| 641 | /* Based on footnote generation code from: |
| 642 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 643 | */ |
| 644 | |
| 645 | footnotes: function () { |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 646 | // Delete existing footnote entries in case we're reloading the footnodes. |
| 647 | var i; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 648 | var noteholder = document.getElementById("footnotes"); |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 649 | if (!noteholder) { |
| 650 | return; |
| 651 | } |
| 652 | var entriesToRemove = []; |
| 653 | for (i = 0; i < noteholder.childNodes.length; i++) { |
| 654 | var entry = noteholder.childNodes[i]; |
| 655 | if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") |
| 656 | entriesToRemove.push(entry); |
| 657 | } |
| 658 | for (i = 0; i < entriesToRemove.length; i++) { |
| 659 | noteholder.removeChild(entriesToRemove[i]); |
| 660 | } |
| 661 | |
| 662 | // Rebuild footnote entries. |
| 663 | var cont = document.getElementById("content"); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 664 | var spans = cont.getElementsByTagName("span"); |
| 665 | var refs = {}; |
| 666 | var n = 0; |
| 667 | for (i=0; i<spans.length; i++) { |
| 668 | if (spans[i].className == "footnote") { |
| 669 | n++; |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 670 | var note = spans[i].getAttribute("data-note"); |
| 671 | if (!note) { |
| 672 | // Use [\s\S] in place of . so multi-line matches work. |
| 673 | // Because JavaScript has no s (dotall) regex flag. |
| 674 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 675 | spans[i].innerHTML = |
| 676 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 677 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 678 | spans[i].setAttribute("data-note", note); |
| 679 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 680 | noteholder.innerHTML += |
| 681 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 682 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 683 | n + "</a>. " + note + "</div>"; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 684 | var id =spans[i].getAttribute("id"); |
| 685 | if (id != null) refs["#"+id] = n; |
| 686 | } |
| 687 | } |
| 688 | if (n == 0) |
| 689 | noteholder.parentNode.removeChild(noteholder); |
| 690 | else { |
| 691 | // Process footnoterefs. |
| 692 | for (i=0; i<spans.length; i++) { |
| 693 | if (spans[i].className == "footnoteref") { |
| 694 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 695 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 696 | n = refs[href]; |
| 697 | spans[i].innerHTML = |
| 698 | "[<a href='#_footnote_" + n + |
| 699 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 700 | } |
| 701 | } |
| 702 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 703 | }, |
| 704 | |
| 705 | install: function(toclevels) { |
| 706 | var timerId; |
| 707 | |
| 708 | function reinstall() { |
| 709 | asciidoc.footnotes(); |
| 710 | if (toclevels) { |
| 711 | asciidoc.toc(toclevels); |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | function reinstallAndRemoveTimer() { |
| 716 | clearInterval(timerId); |
| 717 | reinstall(); |
| 718 | } |
| 719 | |
| 720 | timerId = setInterval(reinstall, 500); |
| 721 | if (document.addEventListener) |
| 722 | document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); |
| 723 | else |
| 724 | window.onload = reinstallAndRemoveTimer; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 725 | } |
| 726 | |
| 727 | } |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 728 | asciidoc.install(); |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 729 | /*]]>*/ |
| 730 | </script> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 731 | </head> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 732 | <body class="manpage"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 733 | <div id="header"> |
| 734 | <h1> |
| 735 | git-clone(1) Manual Page |
| 736 | </h1> |
| 737 | <h2>NAME</h2> |
| 738 | <div class="sectionbody"> |
| 739 | <p>git-clone - |
Junio C Hamano | 4ec0671 | 2007-06-09 20:39:33 | [diff] [blame] | 740 | Clone a repository into a new directory |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 741 | </p> |
| 742 | </div> |
| 743 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 744 | <div id="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 745 | <div class="sect1"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 746 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 747 | <div class="sectionbody"> |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 748 | <div class="verseblock"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 749 | <pre class="content"><em>git clone</em> [--template=<template_directory>] |
Junio C Hamano | af1987f | 2008-08-03 07:58:19 | [diff] [blame] | 750 | [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] |
Junio C Hamano | 2bd8a74 | 2009-12-01 21:16:59 | [diff] [blame] | 751 | [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>] |
Junio C Hamano | f93530e | 2011-05-25 23:59:59 | [diff] [blame] | 752 | [--separate-git-dir <git dir>] |
Junio C Hamano | b5be052 | 2012-01-29 22:20:19 | [diff] [blame] | 753 | [--depth <depth>] [--[no-]single-branch] |
Junio C Hamano | 3d1b5a1 | 2013-05-17 23:34:02 | [diff] [blame] | 754 | [--recursive | --recurse-submodules] [--] <repository> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 755 | [<directory>]</pre> |
| 756 | <div class="attribution"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01: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 | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 763 | <div class="paragraph"><p>Clones a repository into a newly created directory, creates |
Junio C Hamano | 5102d9a | 2006-12-08 07:23:46 | [diff] [blame] | 764 | remote-tracking branches for each branch in the cloned repository |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 765 | (visible using <code>git branch -r</code>), and creates and checks out an |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 766 | initial branch that is forked from the cloned repository’s |
Junio C Hamano | c0e55e7 | 2009-10-10 00:56:29 | [diff] [blame] | 767 | currently active branch.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 768 | <div class="paragraph"><p>After the clone, a plain <code>git fetch</code> without arguments will update |
| 769 | all the remote-tracking branches, and a <code>git pull</code> without |
Junio C Hamano | 5102d9a | 2006-12-08 07:23:46 | [diff] [blame] | 770 | arguments will in addition merge the remote master branch into the |
Junio C Hamano | 6a8a848 | 2012-10-01 20:59:41 | [diff] [blame] | 771 | current master branch, if any (this is untrue when "--single-branch" |
| 772 | is given; see below).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 773 | <div class="paragraph"><p>This default configuration is achieved by creating references to |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 774 | the remote branch heads under <code>refs/remotes/origin</code> and |
| 775 | by initializing <code>remote.origin.url</code> and <code>remote.origin.fetch</code> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 776 | configuration variables.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 777 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 778 | </div> |
| 779 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 780 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 781 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 782 | <div class="dlist"><dl> |
| 783 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 784 | --local |
| 785 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 786 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 787 | -l |
| 788 | </dt> |
| 789 | <dd> |
| 790 | <p> |
| 791 | When the repository to clone from is on a local machine, |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 792 | this flag bypasses the normal "Git aware" transport |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 793 | mechanism and clones the repository by making a copy of |
| 794 | HEAD and everything under objects and refs directories. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 795 | The files under <code>.git/objects/</code> directory are hardlinked |
Junio C Hamano | 7f2b3cb | 2012-06-22 22:42:39 | [diff] [blame] | 796 | to save space when possible. |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 797 | </p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 798 | <div class="paragraph"><p>If the repository is specified as a local path (e.g., <code>/path/to/repo</code>), |
Junio C Hamano | 7f2b3cb | 2012-06-22 22:42:39 | [diff] [blame] | 799 | this is the default, and --local is essentially a no-op. If the |
| 800 | repository is specified as a URL, then this flag is ignored (and we |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 801 | never use the local optimizations). Specifying <code>--no-local</code> will |
| 802 | override the default when <code>/path/to/repo</code> is given, using the regular |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 803 | Git transport instead.</p></div> |
Junio C Hamano | 7f2b3cb | 2012-06-22 22:42:39 | [diff] [blame] | 804 | <div class="paragraph"><p>To force copying instead of hardlinking (which may be desirable if you |
| 805 | are trying to make a back-up of your repository), but still avoid the |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 806 | usual "Git aware" transport mechanism, <code>--no-hardlinks</code> can be used.</p></div> |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 807 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 808 | <dt class="hdlist1"> |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 809 | --no-hardlinks |
| 810 | </dt> |
| 811 | <dd> |
| 812 | <p> |
| 813 | Optimize the cloning process from a repository on a |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 814 | local filesystem by copying files under <code>.git/objects</code> |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 815 | directory. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 816 | </p> |
| 817 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 818 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 819 | --shared |
| 820 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 821 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 822 | -s |
| 823 | </dt> |
| 824 | <dd> |
| 825 | <p> |
| 826 | When the repository to clone is on the local machine, |
| 827 | instead of using hard links, automatically setup |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 828 | <code>.git/objects/info/alternates</code> to share the objects |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 829 | with the source repository. The resulting repository |
| 830 | starts out without any object of its own. |
| 831 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 832 | <div class="paragraph"><p><strong>NOTE</strong>: this is a possibly dangerous operation; do <strong>not</strong> use |
Junio C Hamano | efe3c63 | 2008-02-14 00:51:31 | [diff] [blame] | 833 | it unless you understand what it does. If you clone your |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 834 | repository using this option and then delete branches (or use any |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 835 | other Git command that makes any existing commit unreferenced) in the |
Junio C Hamano | a9aee78 | 2008-04-23 16:09:20 | [diff] [blame] | 836 | source repository, some objects may become unreferenced (or dangling). |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 837 | These objects may be removed by normal Git operations (such as <code>git commit</code>) |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 838 | which automatically call <code>git gc --auto</code>. (See <a href="git-gc.html">git-gc(1)</a>.) |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 839 | If these objects are removed and were referenced by the cloned repository, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 840 | then the cloned repository will become corrupt.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 841 | <div class="paragraph"><p>Note that running <code>git repack</code> without the <code>-l</code> option in a repository |
| 842 | cloned with <code>-s</code> will copy objects from the source repository into a pack |
| 843 | in the cloned repository, removing the disk space savings of <code>clone -s</code>. |
| 844 | It is safe, however, to run <code>git gc</code>, which uses the <code>-l</code> option by |
Junio C Hamano | b937692 | 2009-08-19 00:09:13 | [diff] [blame] | 845 | default.</p></div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 846 | <div class="paragraph"><p>If you want to break the dependency of a repository cloned with <code>-s</code> on |
| 847 | its source repository, you can simply run <code>git repack -a</code> to copy all |
Junio C Hamano | b937692 | 2009-08-19 00:09:13 | [diff] [blame] | 848 | objects from the source repository into a pack in the cloned repository.</p></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 849 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 850 | <dt class="hdlist1"> |
Junio C Hamano | f50bfec | 2006-04-19 09:44:12 | [diff] [blame] | 851 | --reference <repository> |
| 852 | </dt> |
| 853 | <dd> |
| 854 | <p> |
Junio C Hamano | 35b47ca | 2009-09-03 18:11:54 | [diff] [blame] | 855 | If the reference repository is on the local machine, |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 856 | automatically setup <code>.git/objects/info/alternates</code> to |
Junio C Hamano | f50bfec | 2006-04-19 09:44:12 | [diff] [blame] | 857 | obtain objects from the reference repository. Using |
| 858 | an already existing repository as an alternate will |
Junio C Hamano | 250f03e | 2007-09-10 01:33:28 | [diff] [blame] | 859 | require fewer objects to be copied from the repository |
Junio C Hamano | f50bfec | 2006-04-19 09:44:12 | [diff] [blame] | 860 | being cloned, reducing network and local storage costs. |
| 861 | </p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 862 | <div class="paragraph"><p><strong>NOTE</strong>: see the NOTE for the <code>--shared</code> option.</p></div> |
Junio C Hamano | f50bfec | 2006-04-19 09:44:12 | [diff] [blame] | 863 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 864 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 865 | --quiet |
| 866 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 867 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 868 | -q |
| 869 | </dt> |
| 870 | <dd> |
| 871 | <p> |
Junio C Hamano | 6ce6b6c | 2010-01-18 01:25:50 | [diff] [blame] | 872 | Operate quietly. Progress is not reported to the standard |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 873 | error stream. This flag is also passed to the ‘rsync’ |
Junio C Hamano | 3db8b41 | 2008-07-26 06:45:59 | [diff] [blame] | 874 | command when given. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 875 | </p> |
| 876 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 877 | <dt class="hdlist1"> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 878 | --verbose |
| 879 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 880 | <dt class="hdlist1"> |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 881 | -v |
| 882 | </dt> |
| 883 | <dd> |
| 884 | <p> |
Junio C Hamano | ea90ab3 | 2010-03-15 20:32:55 | [diff] [blame] | 885 | Run verbosely. Does not affect the reporting of progress status |
| 886 | to the standard error stream. |
Junio C Hamano | 6ce6b6c | 2010-01-18 01:25:50 | [diff] [blame] | 887 | </p> |
| 888 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 889 | <dt class="hdlist1"> |
Junio C Hamano | 6ce6b6c | 2010-01-18 01:25:50 | [diff] [blame] | 890 | --progress |
| 891 | </dt> |
| 892 | <dd> |
| 893 | <p> |
| 894 | Progress status is reported on the standard error stream |
| 895 | by default when it is attached to a terminal, unless -q |
| 896 | is specified. This flag forces progress status even if the |
| 897 | standard error stream is not directed to a terminal. |
Junio C Hamano | 7d06a8a | 2008-10-20 05:42:33 | [diff] [blame] | 898 | </p> |
| 899 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 900 | <dt class="hdlist1"> |
Junio C Hamano | 1e6e006 | 2007-07-13 05:33:25 | [diff] [blame] | 901 | --no-checkout |
| 902 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 903 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 904 | -n |
| 905 | </dt> |
| 906 | <dd> |
| 907 | <p> |
| 908 | No checkout of HEAD is performed after the clone is complete. |
| 909 | </p> |
| 910 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 911 | <dt class="hdlist1"> |
Junio C Hamano | e663a7a | 2006-01-25 12:37:28 | [diff] [blame] | 912 | --bare |
Junio C Hamano | 38064d5 | 2006-01-15 10:13:49 | [diff] [blame] | 913 | </dt> |
| 914 | <dd> |
| 915 | <p> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 916 | Make a <em>bare</em> Git repository. That is, instead of |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 917 | creating <code><directory></code> and placing the administrative |
| 918 | files in <code><directory>/.git</code>, make the <code><directory></code> |
| 919 | itself the <code>$GIT_DIR</code>. This obviously implies the <code>-n</code> |
Junio C Hamano | 9f292e7 | 2006-11-24 11:37:29 | [diff] [blame] | 920 | because there is nowhere to check out the working tree. |
| 921 | Also the branch heads at the remote are copied directly |
| 922 | to corresponding local branch heads, without mapping |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 923 | them to <code>refs/remotes/origin/</code>. When this option is |
Junio C Hamano | d3361ad | 2007-01-01 03:20:24 | [diff] [blame] | 924 | used, neither remote-tracking branches nor the related |
| 925 | configuration variables are created. |
Junio C Hamano | 38064d5 | 2006-01-15 10:13:49 | [diff] [blame] | 926 | </p> |
| 927 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 928 | <dt class="hdlist1"> |
Junio C Hamano | af1987f | 2008-08-03 07:58:19 | [diff] [blame] | 929 | --mirror |
| 930 | </dt> |
| 931 | <dd> |
| 932 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 933 | Set up a mirror of the source repository. This implies <code>--bare</code>. |
| 934 | Compared to <code>--bare</code>, <code>--mirror</code> not only maps local branches of the |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 935 | source to local branches of the target, it maps all refs (including |
Junio C Hamano | 97bcb48 | 2010-11-25 03:16:07 | [diff] [blame] | 936 | remote-tracking branches, notes etc.) and sets up a refspec configuration such |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 937 | that all these refs are overwritten by a <code>git remote update</code> in the |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 938 | target repository. |
Junio C Hamano | af1987f | 2008-08-03 07:58:19 | [diff] [blame] | 939 | </p> |
| 940 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 941 | <dt class="hdlist1"> |
Junio C Hamano | dcc22ee | 2006-11-03 02:40:13 | [diff] [blame] | 942 | --origin <name> |
| 943 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 944 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 945 | -o <name> |
| 946 | </dt> |
| 947 | <dd> |
| 948 | <p> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 949 | Instead of using the remote name <code>origin</code> to keep track |
| 950 | of the upstream repository, use <code><name></code>. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 951 | </p> |
| 952 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 953 | <dt class="hdlist1"> |
Junio C Hamano | c28068f | 2009-09-08 00:55:23 | [diff] [blame] | 954 | --branch <name> |
| 955 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 956 | <dt class="hdlist1"> |
Junio C Hamano | c28068f | 2009-09-08 00:55:23 | [diff] [blame] | 957 | -b <name> |
| 958 | </dt> |
| 959 | <dd> |
| 960 | <p> |
| 961 | Instead of pointing the newly created HEAD to the branch pointed |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 962 | to by the cloned repository’s HEAD, point to <code><name></code> branch |
Junio C Hamano | 6a8a848 | 2012-10-01 20:59:41 | [diff] [blame] | 963 | instead. In a non-bare repository, this is the branch that will |
| 964 | be checked out. |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 965 | <code>--branch</code> can also take tags and detaches the HEAD at that commit |
Junio C Hamano | 6a8a848 | 2012-10-01 20:59:41 | [diff] [blame] | 966 | in the resulting repository. |
Junio C Hamano | c28068f | 2009-09-08 00:55:23 | [diff] [blame] | 967 | </p> |
| 968 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 969 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 970 | --upload-pack <upload-pack> |
| 971 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 972 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 973 | -u <upload-pack> |
| 974 | </dt> |
| 975 | <dd> |
| 976 | <p> |
Junio C Hamano | 3db8b41 | 2008-07-26 06:45:59 | [diff] [blame] | 977 | When given, and the repository to clone from is accessed |
| 978 | via ssh, this specifies a non-default path for the command |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 979 | run on the other end. |
| 980 | </p> |
| 981 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 982 | <dt class="hdlist1"> |
Junio C Hamano | f31d9f5 | 2006-05-28 20:58:09 | [diff] [blame] | 983 | --template=<template_directory> |
| 984 | </dt> |
| 985 | <dd> |
| 986 | <p> |
| 987 | Specify the directory from which templates will be used; |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 988 | (See the "TEMPLATE DIRECTORY" section of <a href="git-init.html">git-init(1)</a>.) |
Junio C Hamano | f31d9f5 | 2006-05-28 20:58:09 | [diff] [blame] | 989 | </p> |
| 990 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 991 | <dt class="hdlist1"> |
Junio C Hamano | 708376e | 2011-07-19 20:02:13 | [diff] [blame] | 992 | --config <key>=<value> |
| 993 | </dt> |
| 994 | <dt class="hdlist1"> |
| 995 | -c <key>=<value> |
| 996 | </dt> |
| 997 | <dd> |
| 998 | <p> |
| 999 | Set a configuration variable in the newly-created repository; |
| 1000 | this takes effect immediately after the repository is |
| 1001 | initialized, but before the remote history is fetched or any |
| 1002 | files checked out. The key is in the same format as expected by |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1003 | <a href="git-config.html">git-config(1)</a> (e.g., <code>core.eol=true</code>). If multiple |
Junio C Hamano | 708376e | 2011-07-19 20:02:13 | [diff] [blame] | 1004 | values are given for the same key, each value will be written to |
| 1005 | the config file. This makes it safe, for example, to add |
| 1006 | additional fetch refspecs to the origin remote. |
| 1007 | </p> |
| 1008 | </dd> |
| 1009 | <dt class="hdlist1"> |
Junio C Hamano | 0bbd467 | 2007-02-20 04:52:14 | [diff] [blame] | 1010 | --depth <depth> |
Junio C Hamano | b288d9e | 2007-01-02 00:04:15 | [diff] [blame] | 1011 | </dt> |
| 1012 | <dd> |
| 1013 | <p> |
| 1014 | Create a <em>shallow</em> clone with a history truncated to the |
Junio C Hamano | 1c70883 | 2007-11-02 02:47:50 | [diff] [blame] | 1015 | specified number of revisions. A shallow repository has a |
Junio C Hamano | b288d9e | 2007-01-02 00:04:15 | [diff] [blame] | 1016 | number of limitations (you cannot clone or fetch from |
| 1017 | it, nor push from nor into it), but is adequate if you |
Junio C Hamano | 1c70883 | 2007-11-02 02:47:50 | [diff] [blame] | 1018 | are only interested in the recent history of a large project |
| 1019 | with a long history, and would want to send in fixes |
Junio C Hamano | b288d9e | 2007-01-02 00:04:15 | [diff] [blame] | 1020 | as patches. |
| 1021 | </p> |
| 1022 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1023 | <dt class="hdlist1"> |
Junio C Hamano | 3d1b5a1 | 2013-05-17 23:34:02 | [diff] [blame] | 1024 | --[no-]single-branch |
Junio C Hamano | b5be052 | 2012-01-29 22:20:19 | [diff] [blame] | 1025 | </dt> |
| 1026 | <dd> |
| 1027 | <p> |
| 1028 | Clone only the history leading to the tip of a single branch, |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1029 | either specified by the <code>--branch</code> option or the primary |
| 1030 | branch remote’s <code>HEAD</code> points at. When creating a shallow |
| 1031 | clone with the <code>--depth</code> option, this is the default, unless |
| 1032 | <code>--no-single-branch</code> is given to fetch the histories near the |
Junio C Hamano | b5be052 | 2012-01-29 22:20:19 | [diff] [blame] | 1033 | tips of all branches. |
Junio C Hamano | 6a8a848 | 2012-10-01 20:59:41 | [diff] [blame] | 1034 | Further fetches into the resulting repository will only update the |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 1035 | remote-tracking branch for the branch this option was used for the |
Junio C Hamano | 6a8a848 | 2012-10-01 20:59:41 | [diff] [blame] | 1036 | initial cloning. If the HEAD at the remote did not point at any |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1037 | branch when <code>--single-branch</code> clone was made, no remote-tracking |
Junio C Hamano | 6a8a848 | 2012-10-01 20:59:41 | [diff] [blame] | 1038 | branch is created. |
Junio C Hamano | b5be052 | 2012-01-29 22:20:19 | [diff] [blame] | 1039 | </p> |
| 1040 | </dd> |
| 1041 | <dt class="hdlist1"> |
Junio C Hamano | 0e066b9 | 2009-08-28 01:08:41 | [diff] [blame] | 1042 | --recursive |
| 1043 | </dt> |
Junio C Hamano | ed69a74 | 2010-12-01 03:09:23 | [diff] [blame] | 1044 | <dt class="hdlist1"> |
| 1045 | --recurse-submodules |
| 1046 | </dt> |
Junio C Hamano | 0e066b9 | 2009-08-28 01:08:41 | [diff] [blame] | 1047 | <dd> |
| 1048 | <p> |
| 1049 | After the clone is created, initialize all submodules within, |
| 1050 | using their default settings. This is equivalent to running |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1051 | <code>git submodule update --init --recursive</code> immediately after |
Junio C Hamano | 0e066b9 | 2009-08-28 01:08:41 | [diff] [blame] | 1052 | the clone is finished. This option is ignored if the cloned |
| 1053 | repository does not have a worktree/checkout (i.e. if any of |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1054 | <code>--no-checkout</code>/<code>-n</code>, <code>--bare</code>, or <code>--mirror</code> is given) |
Junio C Hamano | 0e066b9 | 2009-08-28 01:08:41 | [diff] [blame] | 1055 | </p> |
| 1056 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1057 | <dt class="hdlist1"> |
Junio C Hamano | a03ac86 | 2011-04-02 04:32:29 | [diff] [blame] | 1058 | --separate-git-dir=<git dir> |
| 1059 | </dt> |
| 1060 | <dd> |
| 1061 | <p> |
| 1062 | Instead of placing the cloned repository where it is supposed |
| 1063 | to be, place the cloned repository at the specified directory, |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1064 | then make a filesytem-agnostic Git symbolic link to there. |
| 1065 | The result is Git repository can be separated from working |
Junio C Hamano | a03ac86 | 2011-04-02 04:32:29 | [diff] [blame] | 1066 | tree. |
| 1067 | </p> |
| 1068 | </dd> |
| 1069 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1070 | <repository> |
| 1071 | </dt> |
| 1072 | <dd> |
| 1073 | <p> |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1074 | The (possibly remote) repository to clone from. See the |
| 1075 | <a href="#URLS">URLS</a> section below for more information on specifying |
| 1076 | repositories. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1077 | </p> |
| 1078 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1079 | <dt class="hdlist1"> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1080 | <directory> |
| 1081 | </dt> |
| 1082 | <dd> |
| 1083 | <p> |
| 1084 | The name of a new directory to clone into. The "humanish" |
| 1085 | part of the source repository is used if no directory is |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1086 | explicitly given (<code>repo</code> for <code>/path/to/repo.git</code> and <code>foo</code> |
| 1087 | for <code>host.xz:foo/.git</code>). Cloning into an existing directory |
Junio C Hamano | 89bdb3b | 2009-05-10 06:48:14 | [diff] [blame] | 1088 | is only allowed if the directory is empty. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1089 | </p> |
| 1090 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1091 | </dl></div> |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 1092 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1093 | </div> |
| 1094 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1095 | <h2 id="_git_urls_a_id_urls_a">GIT URLS<a id="URLS"></a></h2> |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1096 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1097 | <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] | 1098 | address of the remote server, and the path to the repository. |
| 1099 | Depending on the transport protocol, some of this information may be |
| 1100 | absent.</p></div> |
Junio C Hamano | 6631a09 | 2012-10-10 22:50:57 | [diff] [blame] | 1101 | <div class="paragraph"><p>Git supports ssh, git, http, and https protocols (in addition, ftp, |
| 1102 | and ftps can be used for fetching and rsync can be used for fetching |
| 1103 | and pushing, but these are inefficient and deprecated; do not use |
| 1104 | them).</p></div> |
Junio C Hamano | a195230 | 2013-07-01 21:31:18 | [diff] [blame^] | 1105 | <div class="paragraph"><p>The native transport (i.e. git:// URL) does no authentication and |
| 1106 | should be used with caution on unsecured networks.</p></div> |
Junio C Hamano | 6631a09 | 2012-10-10 22:50:57 | [diff] [blame] | 1107 | <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] | 1108 | <div class="ulist"><ul> |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1109 | <li> |
| 1110 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1111 | ssh://[user@]host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1112 | </p> |
| 1113 | </li> |
| 1114 | <li> |
| 1115 | <p> |
Junio C Hamano | a3bb6eb | 2009-02-05 01:26:33 | [diff] [blame] | 1116 | git://host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1117 | </p> |
| 1118 | </li> |
| 1119 | <li> |
| 1120 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1121 | http[s]://host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1122 | </p> |
| 1123 | </li> |
| 1124 | <li> |
| 1125 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1126 | ftp[s]://host.xz[:port]/path/to/repo.git/ |
Junio C Hamano | dbb6459 | 2007-09-01 11:17:39 | [diff] [blame] | 1127 | </p> |
| 1128 | </li> |
| 1129 | <li> |
| 1130 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1131 | rsync://host.xz/path/to/repo.git/ |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1132 | </p> |
| 1133 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1134 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1135 | <div class="paragraph"><p>An alternative scp-like syntax may also be used with the ssh protocol:</p></div> |
| 1136 | <div class="ulist"><ul> |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1137 | <li> |
| 1138 | <p> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1139 | [user@]host.xz:path/to/repo.git/ |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1140 | </p> |
| 1141 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1142 | </ul></div> |
Junio C Hamano | 7e590a1 | 2013-06-02 23:46:52 | [diff] [blame] | 1143 | <div class="paragraph"><p>This syntax is only recognized if there are no slashes before the |
| 1144 | first colon. This helps differentiate a local path that contains a |
| 1145 | colon. For example the local path <code>foo:bar</code> could be specified as an |
| 1146 | absolute path or <code>./foo:bar</code> to avoid being misinterpreted as an ssh |
| 1147 | url.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1148 | <div class="paragraph"><p>The ssh and git protocols additionally support ~username expansion:</p></div> |
| 1149 | <div class="ulist"><ul> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1150 | <li> |
| 1151 | <p> |
| 1152 | ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/ |
| 1153 | </p> |
| 1154 | </li> |
| 1155 | <li> |
| 1156 | <p> |
| 1157 | git://host.xz[:port]/~[user]/path/to/repo.git/ |
| 1158 | </p> |
| 1159 | </li> |
| 1160 | <li> |
| 1161 | <p> |
| 1162 | [user@]host.xz:/~[user]/path/to/repo.git/ |
| 1163 | </p> |
| 1164 | </li> |
| 1165 | </ul></div> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1166 | <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] | 1167 | syntaxes may be used:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1168 | <div class="ulist"><ul> |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1169 | <li> |
| 1170 | <p> |
| 1171 | /path/to/repo.git/ |
| 1172 | </p> |
| 1173 | </li> |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 1174 | <li> |
| 1175 | <p> |
Junio C Hamano | dc8f8de | 2013-06-05 22:58:07 | [diff] [blame] | 1176 | file:///path/to/repo.git/ |
Junio C Hamano | b1d6e88 | 2007-08-11 08:30:16 | [diff] [blame] | 1177 | </p> |
| 1178 | </li> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1179 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1180 | <div class="paragraph"><p>These two syntaxes are mostly equivalent, except the former implies |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1181 | --local option.</p></div> |
Junio C Hamano | 076ffcc | 2013-02-06 05:13:21 | [diff] [blame] | 1182 | <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] | 1183 | attempts to use the <em>remote-<transport></em> remote helper, if one |
| 1184 | exists. To explicitly request a remote helper, the following syntax |
| 1185 | may be used:</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1186 | <div class="ulist"><ul> |
Junio C Hamano | 0c053e8 | 2010-04-19 06:46:34 | [diff] [blame] | 1187 | <li> |
| 1188 | <p> |
| 1189 | <transport>::<address> |
| 1190 | </p> |
| 1191 | </li> |
| 1192 | </ul></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1193 | <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] | 1194 | URL-like string recognized by the specific remote helper being |
Junio C Hamano | b5e079f | 2013-02-08 00:02:52 | [diff] [blame] | 1195 | invoked. See <a href="gitremote-helpers.html">gitremote-helpers(1)</a> for details.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1196 | <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] | 1197 | you want to use a different format for them (such that the URLs you |
| 1198 | use will be rewritten into URLs that work), you can create a |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1199 | configuration section of the form:</p></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1200 | <div class="listingblock"> |
| 1201 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1202 | <pre><code> [url "<actual url base>"] |
| 1203 | insteadOf = <other url base></code></pre> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1204 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1205 | <div class="paragraph"><p>For example, with this:</p></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1206 | <div class="listingblock"> |
| 1207 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1208 | <pre><code> [url "git://git.host.xz/"] |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1209 | insteadOf = host.xz:/path/to/ |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1210 | insteadOf = work:</code></pre> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1211 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1212 | <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] | 1213 | 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] | 1214 | <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] | 1215 | configuration section of the form:</p></div> |
| 1216 | <div class="listingblock"> |
| 1217 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1218 | <pre><code> [url "<actual url base>"] |
| 1219 | pushInsteadOf = <other url base></code></pre> |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1220 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1221 | <div class="paragraph"><p>For example, with this:</p></div> |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1222 | <div class="listingblock"> |
| 1223 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1224 | <pre><code> [url "ssh://example.org/"] |
| 1225 | pushInsteadOf = git://example.org/</code></pre> |
Junio C Hamano | 7df6dcf | 2009-09-13 09:51:17 | [diff] [blame] | 1226 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1227 | <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] | 1228 | "ssh://example.org/path/to/repo.git" for pushes, but pulls will still |
| 1229 | use the original URL.</p></div> |
Junio C Hamano | 330aae6 | 2007-07-06 17:01:58 | [diff] [blame] | 1230 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1231 | </div> |
| 1232 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1233 | <h2 id="_examples">Examples</h2> |
Junio C Hamano | 1bb569e | 2006-05-05 23:14:25 | [diff] [blame] | 1234 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1235 | <div class="ulist"><ul> |
Junio C Hamano | 9ccf664 | 2010-03-22 01:47:35 | [diff] [blame] | 1236 | <li> |
| 1237 | <p> |
| 1238 | Clone from upstream: |
| 1239 | </p> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1240 | <div class="listingblock"> |
| 1241 | <div class="content"> |
Junio C Hamano | a195230 | 2013-07-01 21:31:18 | [diff] [blame^] | 1242 | <pre><code>$ git clone git://git.kernel.org/pub/scm/.../linux.git my-linux |
| 1243 | $ cd my-linux |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1244 | $ make</code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1245 | </div></div> |
Junio C Hamano | 9ccf664 | 2010-03-22 01:47:35 | [diff] [blame] | 1246 | </li> |
| 1247 | <li> |
| 1248 | <p> |
| 1249 | Make a local clone that borrows from the current directory, without checking things out: |
| 1250 | </p> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1251 | <div class="listingblock"> |
| 1252 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1253 | <pre><code>$ git clone -l -s -n . ../copy |
Junio C Hamano | 8638c92 | 2007-05-12 20:50:08 | [diff] [blame] | 1254 | $ cd ../copy |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1255 | $ git show-branch</code></pre> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1256 | </div></div> |
Junio C Hamano | 9ccf664 | 2010-03-22 01:47:35 | [diff] [blame] | 1257 | </li> |
| 1258 | <li> |
| 1259 | <p> |
| 1260 | Clone from upstream while borrowing from an existing local directory: |
| 1261 | </p> |
Junio C Hamano | f50bfec | 2006-04-19 09:44:12 | [diff] [blame] | 1262 | <div class="listingblock"> |
| 1263 | <div class="content"> |
Junio C Hamano | a195230 | 2013-07-01 21:31:18 | [diff] [blame^] | 1264 | <pre><code>$ git clone --reference /git/linux.git \ |
| 1265 | git://git.kernel.org/pub/scm/.../linux.git \ |
| 1266 | my-linux |
| 1267 | $ cd my-linux</code></pre> |
Junio C Hamano | f50bfec | 2006-04-19 09:44:12 | [diff] [blame] | 1268 | </div></div> |
Junio C Hamano | 9ccf664 | 2010-03-22 01:47:35 | [diff] [blame] | 1269 | </li> |
| 1270 | <li> |
| 1271 | <p> |
| 1272 | Create a bare repository to publish your changes to the public: |
| 1273 | </p> |
Junio C Hamano | 38064d5 | 2006-01-15 10:13:49 | [diff] [blame] | 1274 | <div class="listingblock"> |
| 1275 | <div class="content"> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1276 | <pre><code>$ git clone --bare -l /home/proj/.git /pub/scm/proj.git</code></pre> |
Junio C Hamano | 38064d5 | 2006-01-15 10:13:49 | [diff] [blame] | 1277 | </div></div> |
Junio C Hamano | 9ccf664 | 2010-03-22 01:47:35 | [diff] [blame] | 1278 | </li> |
Junio C Hamano | 9ccf664 | 2010-03-22 01:47:35 | [diff] [blame] | 1279 | </ul></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1280 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1281 | </div> |
| 1282 | <div class="sect1"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1283 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1284 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1285 | <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] | 1286 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1287 | </div> |
Junio C Hamano | 9d97115 | 2012-12-19 00:43:11 | [diff] [blame] | 1288 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 1289 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1290 | <div id="footer"> |
| 1291 | <div id="footer-text"> |
Junio C Hamano | a195230 | 2013-07-01 21:31:18 | [diff] [blame^] | 1292 | Last updated 2013-07-01 14:29:27 PDT |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1293 | </div> |
| 1294 | </div> |
| 1295 | </body> |
| 1296 | </html> |