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