Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [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> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.5.2" /> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 7 | <title>git-svn(1)</title> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 8 | <style type="text/css"> |
| 9 | /* Debug borders */ |
| 10 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 11 | /* |
| 12 | border: 1px solid red; |
| 13 | */ |
| 14 | } |
| 15 | |
| 16 | body { |
| 17 | margin: 1em 5% 1em 5%; |
| 18 | } |
| 19 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 20 | a { |
| 21 | color: blue; |
| 22 | text-decoration: underline; |
| 23 | } |
| 24 | a:visited { |
| 25 | color: fuchsia; |
| 26 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 27 | |
| 28 | em { |
| 29 | font-style: italic; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 30 | color: navy; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | strong { |
| 34 | font-weight: bold; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 35 | color: #083194; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | tt { |
| 39 | color: navy; |
| 40 | } |
| 41 | |
| 42 | h1, h2, h3, h4, h5, h6 { |
| 43 | color: #527bbd; |
| 44 | font-family: sans-serif; |
| 45 | margin-top: 1.2em; |
| 46 | margin-bottom: 0.5em; |
| 47 | line-height: 1.3; |
| 48 | } |
| 49 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 50 | h1, h2, h3 { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 51 | border-bottom: 2px solid silver; |
| 52 | } |
| 53 | h2 { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 54 | padding-top: 0.5em; |
| 55 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 56 | h3 { |
| 57 | float: left; |
| 58 | } |
| 59 | h3 + * { |
| 60 | clear: left; |
| 61 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 62 | |
| 63 | div.sectionbody { |
| 64 | font-family: serif; |
| 65 | margin-left: 0; |
| 66 | } |
| 67 | |
| 68 | hr { |
| 69 | border: 1px solid silver; |
| 70 | } |
| 71 | |
| 72 | p { |
| 73 | margin-top: 0.5em; |
| 74 | margin-bottom: 0.5em; |
| 75 | } |
| 76 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 77 | ul, ol, li > p { |
| 78 | margin-top: 0; |
| 79 | } |
| 80 | |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 81 | pre { |
| 82 | padding: 0; |
| 83 | margin: 0; |
| 84 | } |
| 85 | |
| 86 | span#author { |
| 87 | color: #527bbd; |
| 88 | font-family: sans-serif; |
| 89 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 90 | font-size: 1.1em; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 91 | } |
| 92 | span#email { |
| 93 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 94 | span#revnumber, span#revdate, span#revremark { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 95 | font-family: sans-serif; |
| 96 | } |
| 97 | |
| 98 | div#footer { |
| 99 | font-family: sans-serif; |
| 100 | font-size: small; |
| 101 | border-top: 2px solid silver; |
| 102 | padding-top: 0.5em; |
| 103 | margin-top: 4.0em; |
| 104 | } |
| 105 | div#footer-text { |
| 106 | float: left; |
| 107 | padding-bottom: 0.5em; |
| 108 | } |
| 109 | div#footer-badges { |
| 110 | float: right; |
| 111 | padding-bottom: 0.5em; |
| 112 | } |
| 113 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 114 | div#preamble { |
| 115 | margin-top: 1.5em; |
| 116 | margin-bottom: 1.5em; |
| 117 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 118 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 119 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 120 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 121 | margin-top: 1.0em; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 122 | margin-bottom: 1.5em; |
| 123 | } |
| 124 | div.admonitionblock { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 125 | margin-top: 2.0em; |
| 126 | margin-bottom: 2.0em; |
| 127 | margin-right: 10%; |
| 128 | color: #606060; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | div.content { /* Block element content. */ |
| 132 | padding: 0; |
| 133 | } |
| 134 | |
| 135 | /* Block element titles. */ |
| 136 | div.title, caption.title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 137 | color: #527bbd; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 138 | font-family: sans-serif; |
| 139 | font-weight: bold; |
| 140 | text-align: left; |
| 141 | margin-top: 1.0em; |
| 142 | margin-bottom: 0.5em; |
| 143 | } |
| 144 | div.title + * { |
| 145 | margin-top: 0; |
| 146 | } |
| 147 | |
| 148 | td div.title:first-child { |
| 149 | margin-top: 0.0em; |
| 150 | } |
| 151 | div.content div.title:first-child { |
| 152 | margin-top: 0.0em; |
| 153 | } |
| 154 | div.content + div.title { |
| 155 | margin-top: 0.0em; |
| 156 | } |
| 157 | |
| 158 | div.sidebarblock > div.content { |
| 159 | background: #ffffee; |
| 160 | border: 1px solid silver; |
| 161 | padding: 0.5em; |
| 162 | } |
| 163 | |
| 164 | div.listingblock > div.content { |
| 165 | border: 1px solid silver; |
| 166 | background: #f4f4f4; |
| 167 | padding: 0.5em; |
| 168 | } |
| 169 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 170 | div.quoteblock, div.verseblock { |
| 171 | padding-left: 1.0em; |
| 172 | margin-left: 1.0em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 173 | margin-right: 10%; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 174 | border-left: 5px solid #dddddd; |
| 175 | color: #777777; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 176 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 177 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 178 | div.quoteblock > div.attribution { |
| 179 | padding-top: 0.5em; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 180 | text-align: right; |
| 181 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 182 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 183 | div.verseblock > div.content { |
| 184 | white-space: pre; |
| 185 | } |
| 186 | div.verseblock > div.attribution { |
| 187 | padding-top: 0.75em; |
| 188 | text-align: left; |
| 189 | } |
| 190 | /* DEPRECATED: Pre version 8.2.7 verse style literal block. */ |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 191 | div.verseblock + div.attribution { |
| 192 | text-align: left; |
| 193 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 194 | |
| 195 | div.admonitionblock .icon { |
| 196 | vertical-align: top; |
| 197 | font-size: 1.1em; |
| 198 | font-weight: bold; |
| 199 | text-decoration: underline; |
| 200 | color: #527bbd; |
| 201 | padding-right: 0.5em; |
| 202 | } |
| 203 | div.admonitionblock td.content { |
| 204 | padding-left: 0.5em; |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 205 | border-left: 3px solid #dddddd; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | div.exampleblock > div.content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 209 | border-left: 3px solid #dddddd; |
| 210 | padding-left: 0.5em; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 211 | } |
| 212 | |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 213 | div.imageblock div.content { padding-left: 0; } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 214 | span.image img { border-style: none; } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 215 | a.image:visited { color: white; } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 216 | |
| 217 | dl { |
| 218 | margin-top: 0.8em; |
| 219 | margin-bottom: 0.8em; |
| 220 | } |
| 221 | dt { |
| 222 | margin-top: 0.5em; |
| 223 | margin-bottom: 0; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 224 | font-style: normal; |
| 225 | color: navy; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 226 | } |
| 227 | dd > *:first-child { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 228 | margin-top: 0.1em; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | ul, ol { |
| 232 | list-style-position: outside; |
| 233 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 234 | ol.arabic { |
| 235 | list-style-type: decimal; |
| 236 | } |
| 237 | ol.loweralpha { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 238 | list-style-type: lower-alpha; |
| 239 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 240 | ol.upperalpha { |
| 241 | list-style-type: upper-alpha; |
| 242 | } |
| 243 | ol.lowerroman { |
| 244 | list-style-type: lower-roman; |
| 245 | } |
| 246 | ol.upperroman { |
| 247 | list-style-type: upper-roman; |
| 248 | } |
| 249 | |
| 250 | div.compact ul, div.compact ol, |
| 251 | div.compact p, div.compact p, |
| 252 | div.compact div, div.compact div { |
| 253 | margin-top: 0.1em; |
| 254 | margin-bottom: 0.1em; |
| 255 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 256 | |
| 257 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 258 | border: 3px solid #527bbd; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 259 | } |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 260 | thead, p.table.header { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 261 | font-family: sans-serif; |
| 262 | font-weight: bold; |
| 263 | } |
| 264 | tfoot { |
| 265 | font-weight: bold; |
| 266 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 267 | td > div.verse { |
| 268 | white-space: pre; |
| 269 | } |
| 270 | p.table { |
| 271 | margin-top: 0; |
| 272 | } |
| 273 | /* Because the table frame attribute is overriden by CSS in most browsers. */ |
| 274 | div.tableblock > table[frame="void"] { |
| 275 | border-style: none; |
| 276 | } |
| 277 | div.tableblock > table[frame="hsides"] { |
| 278 | border-left-style: none; |
| 279 | border-right-style: none; |
| 280 | } |
| 281 | div.tableblock > table[frame="vsides"] { |
| 282 | border-top-style: none; |
| 283 | border-bottom-style: none; |
| 284 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 285 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 286 | |
| 287 | div.hdlist { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 288 | margin-top: 0.8em; |
| 289 | margin-bottom: 0.8em; |
| 290 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 291 | div.hdlist tr { |
| 292 | padding-bottom: 15px; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 293 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 294 | dt.hdlist1.strong, td.hdlist1.strong { |
| 295 | font-weight: bold; |
| 296 | } |
| 297 | td.hdlist1 { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 298 | vertical-align: top; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 299 | font-style: normal; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 300 | padding-right: 0.8em; |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 301 | color: navy; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 302 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 303 | td.hdlist2 { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 304 | vertical-align: top; |
| 305 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 306 | div.hdlist.compact tr { |
| 307 | margin: 0; |
| 308 | padding-bottom: 0; |
| 309 | } |
| 310 | |
| 311 | .comment { |
| 312 | background: yellow; |
| 313 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 314 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 315 | .footnote, .footnoteref { |
| 316 | font-size: 0.8em; |
| 317 | } |
| 318 | |
| 319 | span.footnote, span.footnoteref { |
| 320 | vertical-align: super; |
| 321 | } |
| 322 | |
| 323 | #footnotes { |
| 324 | margin: 20px 0 20px 0; |
| 325 | padding: 7px 0 0 0; |
| 326 | } |
| 327 | |
| 328 | #footnotes div.footnote { |
| 329 | margin: 0 0 5px 0; |
| 330 | } |
| 331 | |
| 332 | #footnotes hr { |
| 333 | border: none; |
| 334 | border-top: 1px solid silver; |
| 335 | height: 1px; |
| 336 | text-align: left; |
| 337 | margin-left: 0; |
| 338 | width: 20%; |
| 339 | min-width: 100px; |
| 340 | } |
| 341 | |
| 342 | |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 343 | @media print { |
| 344 | div#footer-badges { display: none; } |
| 345 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 346 | |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 347 | div#toc { |
| 348 | margin-bottom: 2.5em; |
| 349 | } |
| 350 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 351 | div#toctitle { |
| 352 | color: #527bbd; |
| 353 | font-family: sans-serif; |
| 354 | font-size: 1.1em; |
| 355 | font-weight: bold; |
| 356 | margin-top: 1.0em; |
| 357 | margin-bottom: 0.1em; |
| 358 | } |
| 359 | |
| 360 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 361 | margin-top: 0; |
| 362 | margin-bottom: 0; |
| 363 | } |
| 364 | div.toclevel2 { |
| 365 | margin-left: 2em; |
| 366 | font-size: 0.9em; |
| 367 | } |
| 368 | div.toclevel3 { |
| 369 | margin-left: 4em; |
| 370 | font-size: 0.9em; |
| 371 | } |
| 372 | div.toclevel4 { |
| 373 | margin-left: 6em; |
| 374 | font-size: 0.9em; |
| 375 | } |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 376 | /* Overrides for manpage documents */ |
| 377 | h1 { |
| 378 | padding-top: 0.5em; |
| 379 | padding-bottom: 0.5em; |
| 380 | border-top: 2px solid silver; |
| 381 | border-bottom: 2px solid silver; |
| 382 | } |
| 383 | h2 { |
| 384 | border-style: none; |
| 385 | } |
| 386 | div.sectionbody { |
| 387 | margin-left: 5%; |
| 388 | } |
| 389 | |
| 390 | @media print { |
| 391 | div#toc { display: none; } |
| 392 | } |
| 393 | |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 394 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 395 | |
| 396 | div.sidebar-content { |
| 397 | background: #ffffee; |
| 398 | border: 1px solid silver; |
| 399 | padding: 0.5em; |
| 400 | } |
| 401 | div.sidebar-title, div.image-title { |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 402 | color: #527bbd; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 403 | font-family: sans-serif; |
| 404 | font-weight: bold; |
| 405 | margin-top: 0.0em; |
| 406 | margin-bottom: 0.5em; |
| 407 | } |
| 408 | |
| 409 | div.listingblock div.content { |
| 410 | border: 1px solid silver; |
| 411 | background: #f4f4f4; |
| 412 | padding: 0.5em; |
| 413 | } |
| 414 | |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 415 | div.quoteblock-attribution { |
| 416 | padding-top: 0.5em; |
| 417 | text-align: right; |
| 418 | } |
| 419 | |
| 420 | div.verseblock-content { |
| 421 | white-space: pre; |
| 422 | } |
| 423 | div.verseblock-attribution { |
| 424 | padding-top: 0.75em; |
| 425 | text-align: left; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 426 | } |
| 427 | |
| 428 | div.exampleblock-content { |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 429 | border-left: 3px solid #dddddd; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 430 | padding-left: 0.5em; |
| 431 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 432 | |
| 433 | /* IE6 sets dynamically generated links as visited. */ |
| 434 | div#toc a:visited { color: blue; } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 435 | </style> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 436 | <script type="text/javascript"> |
| 437 | /*<+'])'); |
| 481 | // Function that scans the DOM tree for header elements (the DOM2 |
| 482 | // nodeIterator API would be a better technique but not supported by all |
| 483 | // browsers). |
| 484 | var iterate = function (el) { |
| 485 | for (var i = el.firstChild; i != null; i = i.nextSibling) { |
| 486 | if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { |
| 487 | var mo = re.exec(i.tagName); |
| 488 | if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { |
| 489 | result[result.length] = new TocEntry(i, getText(i), mo[1]-1); |
| 490 | } |
| 491 | iterate(i); |
| 492 | } |
| 493 | } |
| 494 | } |
| 495 | iterate(el); |
| 496 | return result; |
| 497 | } |
| 498 | |
| 499 | var toc = document.getElementById("toc"); |
| 500 | var entries = tocEntries(document.getElementById("content"), toclevels); |
| 501 | for (var i = 0; i < entries.length; ++i) { |
| 502 | var entry = entries[i]; |
| 503 | if (entry.element.id == "") |
| 504 | entry.element.id = "_toc_" + i; |
| 505 | var a = document.createElement("a"); |
| 506 | a.href = "#" + entry.element.id; |
| 507 | a.appendChild(document.createTextNode(entry.text)); |
| 508 | var div = document.createElement("div"); |
| 509 | div.appendChild(a); |
| 510 | div.className = "toclevel" + entry.toclevel; |
| 511 | toc.appendChild(div); |
| 512 | } |
| 513 | if (entries.length == 0) |
| 514 | toc.parentNode.removeChild(toc); |
| 515 | }, |
| 516 | |
| 517 | |
| 518 | ///////////////////////////////////////////////////////////////////// |
| 519 | // Footnotes generator |
| 520 | ///////////////////////////////////////////////////////////////////// |
| 521 | |
| 522 | /* Based on footnote generation code from: |
| 523 | * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html |
| 524 | */ |
| 525 | |
| 526 | footnotes: function () { |
| 527 | var cont = document.getElementById("content"); |
| 528 | var noteholder = document.getElementById("footnotes"); |
| 529 | var spans = cont.getElementsByTagName("span"); |
| 530 | var refs = {}; |
| 531 | var n = 0; |
| 532 | for (i=0; i<spans.length; i++) { |
| 533 | if (spans[i].className == "footnote") { |
| 534 | n++; |
| 535 | // Use [\s\S] in place of . so multi-line matches work. |
| 536 | // Because JavaScript has no s (dotall) regex flag. |
| 537 | note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1]; |
| 538 | noteholder.innerHTML += |
| 539 | "<div class='footnote' id='_footnote_" + n + "'>" + |
| 540 | "<a href='#_footnoteref_" + n + "' title='Return to text'>" + |
| 541 | n + "</a>. " + note + "</div>"; |
| 542 | spans[i].innerHTML = |
| 543 | "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n + |
| 544 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 545 | var id =spans[i].getAttribute("id"); |
| 546 | if (id != null) refs["#"+id] = n; |
| 547 | } |
| 548 | } |
| 549 | if (n == 0) |
| 550 | noteholder.parentNode.removeChild(noteholder); |
| 551 | else { |
| 552 | // Process footnoterefs. |
| 553 | for (i=0; i<spans.length; i++) { |
| 554 | if (spans[i].className == "footnoteref") { |
| 555 | var href = spans[i].getElementsByTagName("a")[0].getAttribute("href"); |
| 556 | href = href.match(/#.*/)[0]; // Because IE return full URL. |
| 557 | n = refs[href]; |
| 558 | spans[i].innerHTML = |
| 559 | "[<a href='#_footnote_" + n + |
| 560 | "' title='View footnote' class='footnote'>" + n + "</a>]"; |
| 561 | } |
| 562 | } |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | } |
| 567 | /*]]>*/ |
| 568 | </script> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 569 | </head> |
| 570 | <body> |
| 571 | <div id="header"> |
| 572 | <h1> |
| 573 | git-svn(1) Manual Page |
| 574 | </h1> |
| 575 | <h2>NAME</h2> |
| 576 | <div class="sectionbody"> |
| 577 | <p>git-svn - |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 578 | Bidirectional operation between a Subversion repository and git |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 579 | </p> |
| 580 | </div> |
| 581 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 582 | <div id="content"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 583 | <h2 id="_synopsis">SYNOPSIS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 584 | <div class="sectionbody"> |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 585 | <div class="verseblock"> |
| 586 | <div class="verseblock-content"><em>git svn</em> <command> [options] [arguments]</div> |
| 587 | <div class="verseblock-attribution"> |
| 588 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 589 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 590 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 591 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 592 | <div class="paragraph"><p><em>git svn</em> is a simple conduit for changesets between Subversion and git. |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 593 | It provides a bidirectional flow of changes between a Subversion and a git |
Junio C Hamano | cb1c44f | 2008-08-06 06:19:33 | [diff] [blame] | 594 | repository.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 595 | <div class="paragraph"><p><em>git svn</em> can track a standard Subversion repository, |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 596 | following the common "trunk/branches/tags" layout, with the --stdlayout option. |
| 597 | It can also follow branches and tags in any layout with the -T/-t/-b options |
| 598 | (see options to <em>init</em> below, and also the <em>clone</em> command).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 599 | <div class="paragraph"><p>Once tracking a Subversion repository (with any of the above methods), the git |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 600 | repository can be updated from Subversion by the <em>fetch</em> command and |
| 601 | Subversion updated from git by the <em>dcommit</em> command.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 602 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 603 | <h2 id="_commands">COMMANDS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 604 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 605 | <div class="dlist"><dl> |
| 606 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 607 | <em>init</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 608 | </dt> |
| 609 | <dd> |
| 610 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 611 | Initializes an empty git repository with additional |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 612 | metadata directories for <em>git svn</em>. The Subversion URL |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 613 | may be specified as a command-line argument, or as full |
| 614 | URL arguments to -T/-t/-b. Optionally, the target |
| 615 | directory to operate on can be specified as a second |
| 616 | argument. Normally this command initializes the current |
| 617 | directory. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 618 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 619 | <div class="dlist"><dl> |
| 620 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 621 | -T<trunk_subdir> |
| 622 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 623 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 624 | --trunk=<trunk_subdir> |
| 625 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 626 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 627 | -t<tags_subdir> |
| 628 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 629 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 630 | --tags=<tags_subdir> |
| 631 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 632 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 633 | -b<branches_subdir> |
| 634 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 635 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 636 | --branches=<branches_subdir> |
| 637 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 638 | <dt class="hdlist1"> |
Junio C Hamano | 377018d | 2007-08-23 08:41:31 | [diff] [blame] | 639 | -s |
| 640 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 641 | <dt class="hdlist1"> |
Junio C Hamano | 377018d | 2007-08-23 08:41:31 | [diff] [blame] | 642 | --stdlayout |
| 643 | </dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 644 | <dd> |
| 645 | <p> |
| 646 | These are optional command-line options for init. Each of |
| 647 | these flags can point to a relative repository path |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 648 | (--tags=project/tags) or a full url |
| 649 | (--tags=https://foo.org/project/tags). |
| 650 | You can specify more than one --tags and/or --branches options, in case |
| 651 | your Subversion repository places tags or branches under multiple paths. |
| 652 | The option --stdlayout is |
Junio C Hamano | 377018d | 2007-08-23 08:41:31 | [diff] [blame] | 653 | a shorthand way of setting trunk,tags,branches as the relative paths, |
| 654 | which is the Subversion default. If any of the other options are given |
| 655 | as well, they take precedence. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 656 | </p> |
| 657 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 658 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 659 | --no-metadata |
| 660 | </dt> |
| 661 | <dd> |
| 662 | <p> |
| 663 | Set the <em>noMetadata</em> option in the [svn-remote] config. |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 664 | This option is not recommended, please read the <em>svn.noMetadata</em> |
| 665 | section of this manpage before using this option. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 666 | </p> |
| 667 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 668 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 669 | --use-svm-props |
| 670 | </dt> |
| 671 | <dd> |
| 672 | <p> |
| 673 | Set the <em>useSvmProps</em> option in the [svn-remote] config. |
| 674 | </p> |
| 675 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 676 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 677 | --use-svnsync-props |
| 678 | </dt> |
| 679 | <dd> |
| 680 | <p> |
| 681 | Set the <em>useSvnsyncProps</em> option in the [svn-remote] config. |
| 682 | </p> |
| 683 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 684 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 685 | --rewrite-root=<URL> |
| 686 | </dt> |
| 687 | <dd> |
| 688 | <p> |
| 689 | Set the <em>rewriteRoot</em> option in the [svn-remote] config. |
| 690 | </p> |
| 691 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 692 | <dt class="hdlist1"> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 693 | --rewrite-uuid=<UUID> |
| 694 | </dt> |
| 695 | <dd> |
| 696 | <p> |
| 697 | Set the <em>rewriteUUID</em> option in the [svn-remote] config. |
| 698 | </p> |
| 699 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 700 | <dt class="hdlist1"> |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 701 | --username=<user> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 702 | </dt> |
| 703 | <dd> |
| 704 | <p> |
| 705 | For transports that SVN handles authentication for (http, |
| 706 | https, and plain svn), specify the username. For other |
| 707 | transports (eg svn+ssh://), you must include the username in |
| 708 | the URL, eg svn+ssh://foo@svn.bar.com/project |
| 709 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 710 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 711 | <dt class="hdlist1"> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 712 | --prefix=<prefix> |
| 713 | </dt> |
| 714 | <dd> |
| 715 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 716 | This allows one to specify a prefix which is prepended |
| 717 | to the names of remotes if trunk/branches/tags are |
| 718 | specified. The prefix does not automatically include a |
| 719 | trailing slash, so be sure you include one in the |
Junio C Hamano | 0a2ad89 | 2007-06-24 22:23:12 | [diff] [blame] | 720 | argument if that is what you want. If --branches/-b is |
| 721 | specified, the prefix must include a trailing slash. |
| 722 | Setting a prefix is useful if you wish to track multiple |
| 723 | projects that share a common repository. |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 724 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 725 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 726 | <dt class="hdlist1"> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 727 | --ignore-paths=<regex> |
| 728 | </dt> |
| 729 | <dd> |
| 730 | <p> |
| 731 | When passed to <em>init</em> or <em>clone</em> this regular expression will |
| 732 | be preserved as a config key. See <em>fetch</em> for a description |
| 733 | of <em>--ignore-paths</em>. |
| 734 | </p> |
| 735 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 736 | <dt class="hdlist1"> |
Junio C Hamano | aa2cd76 | 2009-07-26 08:14:01 | [diff] [blame] | 737 | --no-minimize-url |
| 738 | </dt> |
| 739 | <dd> |
| 740 | <p> |
| 741 | When tracking multiple directories (using --stdlayout, |
| 742 | --branches, or --tags options), git svn will attempt to connect |
| 743 | to the root (or highest allowed level) of the Subversion |
| 744 | repository. This default allows better tracking of history if |
| 745 | entire projects are moved within a repository, but may cause |
| 746 | issues on repositories where read access restrictions are in |
| 747 | place. Passing <em>--no-minimize-url</em> will allow git svn to |
| 748 | accept URLs as-is without attempting to connect to a higher |
| 749 | level directory. This option is off by default when only |
| 750 | one URL/branch is tracked (it would do little good). |
| 751 | </p> |
| 752 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 753 | </dl></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 754 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 755 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 756 | <em>fetch</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 757 | </dt> |
| 758 | <dd> |
| 759 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 760 | Fetch unfetched revisions from the Subversion remote we are |
| 761 | tracking. The name of the [svn-remote "…"] section in the |
| 762 | .git/config file may be specified as an optional command-line |
| 763 | argument. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 764 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 765 | <div class="dlist"><dl> |
| 766 | <dt class="hdlist1"> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 767 | --localtime |
| 768 | </dt> |
| 769 | <dd> |
| 770 | <p> |
| 771 | Store Git commit times in the local timezone instead of UTC. This |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 772 | makes <em>git log</em> (even without --date=local) show the same times |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 773 | that <tt>svn log</tt> would in the local timezone. |
| 774 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 775 | <div class="paragraph"><p>This doesn’t interfere with interoperating with the Subversion |
Junio C Hamano | 0df868a | 2009-08-19 07:28:28 | [diff] [blame] | 776 | repository you cloned from, but if you wish for your local Git |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 777 | repository to be able to interoperate with someone else’s local Git |
| 778 | repository, either don’t use this option or you should both use it in |
Junio C Hamano | 0df868a | 2009-08-19 07:28:28 | [diff] [blame] | 779 | the same local timezone.</p></div> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 780 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 781 | <dt class="hdlist1"> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 782 | --parent |
| 783 | </dt> |
| 784 | <dd> |
| 785 | <p> |
| 786 | Fetch only from the SVN parent of the current HEAD. |
| 787 | </p> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 788 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 789 | <dt class="hdlist1"> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 790 | --ignore-paths=<regex> |
| 791 | </dt> |
| 792 | <dd> |
| 793 | <p> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 794 | This allows one to specify a Perl regular expression that will |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 795 | cause skipping of all matching paths from checkout from SVN. |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 796 | The <em>--ignore-paths</em> option should match for every <em>fetch</em> |
| 797 | (including automatic fetches due to <em>clone</em>, <em>dcommit</em>, |
| 798 | <em>rebase</em>, etc) on a given repository. |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 799 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 800 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 801 | <div class="verseblock-content">config key: svn-remote.<name>.ignore-paths</div> |
| 802 | <div class="verseblock-attribution"> |
| 803 | </div></div> |
| 804 | <div class="paragraph"><p>If the ignore-paths config key is set and the command line option is |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 805 | also given, both regular expressions will be used.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 806 | <div class="paragraph"><p>Examples:</p></div> |
| 807 | <div class="dlist"><dl> |
| 808 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 809 | Skip "doc*" directory for every fetch |
| 810 | </dt> |
| 811 | <dd> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 812 | <div class="listingblock"> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 813 | <div class="content"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 814 | <pre><tt>--ignore-paths="^doc"</tt></pre> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 815 | </div></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 816 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 817 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 818 | Skip "branches" and "tags" of first level directories |
| 819 | </dt> |
| 820 | <dd> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 821 | <div class="listingblock"> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 822 | <div class="content"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 823 | <pre><tt>--ignore-paths="^[^/]+/(?:branches|tags)"</tt></pre> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 824 | </div></div> |
| 825 | </dd> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 826 | </dl></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 827 | </dd> |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 828 | <dt class="hdlist1"> |
| 829 | --log-window-size=<n> |
| 830 | </dt> |
| 831 | <dd> |
| 832 | <p> |
| 833 | Fetch <n> log entries per request when scanning Subversion history. |
| 834 | The default is 100. For very large Subversion repositories, larger |
| 835 | values may be needed for <em>clone</em>/<em>fetch</em> to complete in reasonable |
| 836 | time. But overly large values may lead to higher memory usage and |
| 837 | request timeouts. |
| 838 | </p> |
| 839 | </dd> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 840 | </dl></div> |
| 841 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 842 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 843 | <em>clone</em> |
| 844 | </dt> |
| 845 | <dd> |
| 846 | <p> |
| 847 | Runs <em>init</em> and <em>fetch</em>. It will automatically create a |
| 848 | directory based on the basename of the URL passed to it; |
| 849 | or if a second argument is passed; it will create a directory |
| 850 | and work within that. It accepts all arguments that the |
| 851 | <em>init</em> and <em>fetch</em> commands accept; with the exception of |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 852 | <em>--fetch-all</em> and <em>--parent</em>. After a repository is cloned, |
| 853 | the <em>fetch</em> command will be able to update revisions without |
| 854 | affecting the working tree; and the <em>rebase</em> command will be |
| 855 | able to update the working tree with the latest changes. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 856 | </p> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 857 | <div class="dlist"><dl> |
| 858 | <dt class="hdlist1"> |
| 859 | --preserve-empty-dirs |
| 860 | </dt> |
| 861 | <dd> |
| 862 | <p> |
| 863 | Create a placeholder file in the local Git repository for each |
| 864 | empty directory fetched from Subversion. This includes directories |
| 865 | that become empty by removing all entries in the Subversion |
| 866 | repository (but not the directory itself). The placeholder files |
| 867 | are also tracked and removed when no longer necessary. |
| 868 | </p> |
| 869 | </dd> |
| 870 | <dt class="hdlist1"> |
| 871 | --placeholder-filename=<filename> |
| 872 | </dt> |
| 873 | <dd> |
| 874 | <p> |
| 875 | Set the name of placeholder files created by --preserve-empty-dirs. |
| 876 | Default: ".gitignore" |
| 877 | </p> |
| 878 | </dd> |
| 879 | </dl></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 880 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 881 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 882 | <em>rebase</em> |
| 883 | </dt> |
| 884 | <dd> |
| 885 | <p> |
| 886 | This fetches revisions from the SVN parent of the current HEAD |
| 887 | and rebases the current (uncommitted to SVN) work against it. |
| 888 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 889 | <div class="paragraph"><p>This works similarly to <tt>svn update</tt> or <em>git pull</em> except that |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 890 | it preserves linear history with <em>git rebase</em> instead of |
| 891 | <em>git merge</em> for ease of dcommitting with <em>git svn</em>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 892 | <div class="paragraph"><p>This accepts all options that <em>git svn fetch</em> and <em>git rebase</em> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 893 | accept. However, <em>--fetch-all</em> only fetches from the current |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 894 | [svn-remote], and not all [svn-remote] definitions.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 895 | <div class="paragraph"><p>Like <em>git rebase</em>; this requires that the working tree be clean |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 896 | and have no uncommitted changes.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 897 | <div class="dlist"><dl> |
| 898 | <dt class="hdlist1"> |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 899 | -l |
| 900 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 901 | <dt class="hdlist1"> |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 902 | --local |
| 903 | </dt> |
| 904 | <dd> |
| 905 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 906 | Do not fetch remotely; only run <em>git rebase</em> against the |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 907 | last fetched commit from the upstream SVN. |
| 908 | </p> |
| 909 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 910 | </dl></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 911 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 912 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 913 | <em>dcommit</em> |
| 914 | </dt> |
| 915 | <dd> |
| 916 | <p> |
Junio C Hamano | f94fd6c | 2012-05-17 22:55:14 | [diff] [blame] | 917 | Commit each diff from the current branch directly to the SVN |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 918 | repository, and then rebase or reset (depending on whether or |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 919 | not there is a diff between SVN and head). This will create |
| 920 | a revision in SVN for each commit in git. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 921 | </p> |
Junio C Hamano | f94fd6c | 2012-05-17 22:55:14 | [diff] [blame] | 922 | <div class="paragraph"><p>When an optional git branch name (or a git commit object name) |
| 923 | is specified as an argument, the subcommand works on the specified |
| 924 | branch, not on the current branch.</p></div> |
| 925 | <div class="paragraph"><p>Use of <em>dcommit</em> is preferred to <em>set-tree</em> (below).</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 926 | <div class="dlist"><dl> |
| 927 | <dt class="hdlist1"> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 928 | --no-rebase |
| 929 | </dt> |
| 930 | <dd> |
| 931 | <p> |
| 932 | After committing, do not rebase or reset. |
| 933 | </p> |
| 934 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 935 | <dt class="hdlist1"> |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 936 | --commit-url <URL> |
| 937 | </dt> |
| 938 | <dd> |
| 939 | <p> |
| 940 | Commit to this SVN URL (the full path). This is intended to |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 941 | allow existing <em>git svn</em> repositories created with one transport |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 942 | method (e.g. <tt>svn://</tt> or <tt>http://</tt> for anonymous read) to be |
| 943 | reused if a user is later given access to an alternate transport |
| 944 | method (e.g. <tt>svn+ssh://</tt> or <tt>https://</tt>) for commit. |
| 945 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 946 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 947 | <div class="verseblock-content">config key: svn-remote.<name>.commiturl |
| 948 | config key: svn.commiturl (overwrites all svn-remote.<name>.commiturl options)</div> |
| 949 | <div class="verseblock-attribution"> |
| 950 | </div></div> |
| 951 | <div class="paragraph"><p>Using this option for any other purpose (don’t ask) is very strongly |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 952 | discouraged.</p></div> |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 953 | </dd> |
Junio C Hamano | 0a90152 | 2011-04-19 22:42:05 | [diff] [blame] | 954 | <dt class="hdlist1"> |
| 955 | --mergeinfo=<mergeinfo> |
| 956 | </dt> |
| 957 | <dd> |
| 958 | <p> |
| 959 | Add the given merge information during the dcommit |
| 960 | (e.g. <tt>--mergeinfo="/branches/foo:1-10"</tt>). All svn server versions can |
| 961 | store this information (as a property), and svn clients starting from |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 962 | version 1.5 can make use of it. To specify merge information from multiple |
| 963 | branches, use a single space character between the branches |
| 964 | (<tt>--mergeinfo="/branches/foo:1-10 /branches/bar:3,5-6,8"</tt>) |
Junio C Hamano | 0a90152 | 2011-04-19 22:42:05 | [diff] [blame] | 965 | </p> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 966 | <div class="verseblock"> |
| 967 | <div class="verseblock-content">config key: svn.pushmergeinfo</div> |
| 968 | <div class="verseblock-attribution"> |
| 969 | </div></div> |
| 970 | <div class="paragraph"><p>This option will cause git-svn to attempt to automatically populate the |
| 971 | svn:mergeinfo property in the SVN repository when possible. Currently, this can |
| 972 | only be done when dcommitting non-fast-forward merges where all parents but the |
| 973 | first have already been pushed into SVN.</p></div> |
Junio C Hamano | 0a90152 | 2011-04-19 22:42:05 | [diff] [blame] | 974 | </dd> |
Junio C Hamano | 483c578 | 2011-10-16 20:42:22 | [diff] [blame] | 975 | <dt class="hdlist1"> |
| 976 | --interactive |
| 977 | </dt> |
| 978 | <dd> |
| 979 | <p> |
| 980 | Ask the user to confirm that a patch set should actually be sent to SVN. |
| 981 | For each patch, one may answer "yes" (accept this patch), "no" (discard this |
| 982 | patch), "all" (accept all patches), or "quit". |
| 983 | <br /> |
| 984 | <em>git svn dcommit</em> returns immediately if answer if "no" or "quit", without |
| 985 | commiting anything to SVN. |
| 986 | </p> |
| 987 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 988 | </dl></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 989 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 990 | <dt class="hdlist1"> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 991 | <em>branch</em> |
| 992 | </dt> |
| 993 | <dd> |
| 994 | <p> |
| 995 | Create a branch in the SVN repository. |
| 996 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 997 | <div class="dlist"><dl> |
| 998 | <dt class="hdlist1"> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 999 | -m |
| 1000 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1001 | <dt class="hdlist1"> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1002 | --message |
| 1003 | </dt> |
| 1004 | <dd> |
| 1005 | <p> |
| 1006 | Allows to specify the commit message. |
| 1007 | </p> |
| 1008 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1009 | <dt class="hdlist1"> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1010 | -t |
| 1011 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1012 | <dt class="hdlist1"> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1013 | --tag |
| 1014 | </dt> |
| 1015 | <dd> |
| 1016 | <p> |
| 1017 | Create a tag by using the tags_subdir instead of the branches_subdir |
| 1018 | specified during git svn init. |
| 1019 | </p> |
| 1020 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1021 | <dt class="hdlist1"> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1022 | -d |
| 1023 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1024 | <dt class="hdlist1"> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1025 | --destination |
| 1026 | </dt> |
| 1027 | <dd> |
| 1028 | <p> |
| 1029 | If more than one --branches (or --tags) option was given to the <em>init</em> |
| 1030 | or <em>clone</em> command, you must provide the location of the branch (or |
| 1031 | tag) you wish to create in the SVN repository. The value of this |
| 1032 | option must match one of the paths specified by a --branches (or |
| 1033 | --tags) option. You can see these paths with the commands |
| 1034 | </p> |
| 1035 | <div class="literalblock"> |
| 1036 | <div class="content"> |
| 1037 | <pre><tt>git config --get-all svn-remote.<name>.branches |
| 1038 | git config --get-all svn-remote.<name>.tags</tt></pre> |
| 1039 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1040 | <div class="paragraph"><p>where <name> is the name of the SVN repository as specified by the -R option to |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1041 | <em>init</em> (or "svn" by default).</p></div> |
| 1042 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1043 | <dt class="hdlist1"> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1044 | --username |
| 1045 | </dt> |
| 1046 | <dd> |
| 1047 | <p> |
| 1048 | Specify the SVN username to perform the commit as. This option overrides |
Junio C Hamano | 072d22b | 2010-05-10 02:49:38 | [diff] [blame] | 1049 | the <em>username</em> configuration property. |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1050 | </p> |
| 1051 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1052 | <dt class="hdlist1"> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1053 | --commit-url |
| 1054 | </dt> |
| 1055 | <dd> |
| 1056 | <p> |
| 1057 | Use the specified URL to connect to the destination Subversion |
| 1058 | repository. This is useful in cases where the source SVN |
| 1059 | repository is read-only. This option overrides configuration |
| 1060 | property <em>commiturl</em>. |
| 1061 | </p> |
| 1062 | <div class="literalblock"> |
| 1063 | <div class="content"> |
| 1064 | <pre><tt>git config --get-all svn-remote.<name>.commiturl</tt></pre> |
| 1065 | </div></div> |
| 1066 | </dd> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1067 | </dl></div> |
| 1068 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1069 | <dt class="hdlist1"> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1070 | <em>tag</em> |
| 1071 | </dt> |
| 1072 | <dd> |
| 1073 | <p> |
| 1074 | Create a tag in the SVN repository. This is a shorthand for |
| 1075 | <em>branch -t</em>. |
| 1076 | </p> |
| 1077 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1078 | <dt class="hdlist1"> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1079 | <em>log</em> |
| 1080 | </dt> |
| 1081 | <dd> |
| 1082 | <p> |
| 1083 | This should make it easy to look up svn log messages when svn |
| 1084 | users refer to -r/--revision numbers. |
| 1085 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1086 | <div class="paragraph"><p>The following features from ‘svn log’ are supported:</p></div> |
| 1087 | <div class="dlist"><dl> |
| 1088 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1089 | -r <n>[:<n>] |
| 1090 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1091 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1092 | --revision=<n>[:<n>] |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1093 | </dt> |
| 1094 | <dd> |
| 1095 | <p> |
| 1096 | is supported, non-numeric args are not: |
| 1097 | HEAD, NEXT, BASE, PREV, etc … |
| 1098 | </p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1099 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1100 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1101 | -v |
| 1102 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1103 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1104 | --verbose |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1105 | </dt> |
| 1106 | <dd> |
| 1107 | <p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1108 | it’s not completely compatible with the --verbose |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1109 | output in svn log, but reasonably close. |
| 1110 | </p> |
| 1111 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1112 | <dt class="hdlist1"> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1113 | --limit=<n> |
| 1114 | </dt> |
| 1115 | <dd> |
| 1116 | <p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1117 | is NOT the same as --max-count, doesn’t count |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1118 | merged/excluded commits |
| 1119 | </p> |
| 1120 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1121 | <dt class="hdlist1"> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1122 | --incremental |
| 1123 | </dt> |
| 1124 | <dd> |
| 1125 | <p> |
| 1126 | supported |
| 1127 | </p> |
| 1128 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1129 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1130 | <div class="paragraph"><p>New features:</p></div> |
| 1131 | <div class="dlist"><dl> |
| 1132 | <dt class="hdlist1"> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1133 | --show-commit |
| 1134 | </dt> |
| 1135 | <dd> |
| 1136 | <p> |
| 1137 | shows the git commit sha1, as well |
| 1138 | </p> |
| 1139 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1140 | <dt class="hdlist1"> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1141 | --oneline |
| 1142 | </dt> |
| 1143 | <dd> |
| 1144 | <p> |
| 1145 | our version of --pretty=oneline |
| 1146 | </p> |
| 1147 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1148 | </dl></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 1149 | <div class="admonitionblock"> |
| 1150 | <table><tr> |
| 1151 | <td class="icon"> |
| 1152 | <div class="title">Note</div> |
| 1153 | </td> |
| 1154 | <td class="content">SVN itself only stores times in UTC and nothing else. The regular svn |
| 1155 | client converts the UTC time to the local time (or based on the TZ= |
| 1156 | environment). This command has the same behaviour.</td> |
| 1157 | </tr></table> |
| 1158 | </div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1159 | <div class="paragraph"><p>Any other arguments are passed directly to <em>git log</em></p></div> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1160 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1161 | <dt class="hdlist1"> |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 1162 | <em>blame</em> |
| 1163 | </dt> |
| 1164 | <dd> |
| 1165 | <p> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1166 | Show what revision and author last modified each line of a file. The |
| 1167 | output of this mode is format-compatible with the output of |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1168 | ‘svn blame’ by default. Like the SVN blame command, |
Junio C Hamano | 8fb66e5 | 2011-10-05 20:59:51 | [diff] [blame] | 1169 | local uncommitted changes in the working tree are ignored; |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1170 | the version of the file in the HEAD revision is annotated. Unknown |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1171 | arguments are passed directly to <em>git blame</em>. |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 1172 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1173 | <div class="dlist"><dl> |
| 1174 | <dt class="hdlist1"> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1175 | --git-format |
| 1176 | </dt> |
| 1177 | <dd> |
| 1178 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1179 | Produce output in the same format as <em>git blame</em>, but with |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1180 | SVN revision numbers instead of git commit hashes. In this mode, |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1181 | changes that haven’t been committed to SVN (including local |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 1182 | working-copy edits) are shown as revision 0. |
| 1183 | </p> |
| 1184 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1185 | </dl></div> |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 1186 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1187 | <dt class="hdlist1"> |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 1188 | <em>find-rev</em> |
| 1189 | </dt> |
| 1190 | <dd> |
| 1191 | <p> |
| 1192 | When given an SVN revision number of the form <em>rN</em>, returns the |
Junio C Hamano | b63afff | 2007-05-01 03:05:55 | [diff] [blame] | 1193 | corresponding git commit hash (this can optionally be followed by a |
| 1194 | tree-ish to specify which branch should be searched). When given a |
| 1195 | tree-ish, returns the corresponding SVN revision number. |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 1196 | </p> |
| 1197 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1198 | <dt class="hdlist1"> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 1199 | <em>set-tree</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1200 | </dt> |
| 1201 | <dd> |
| 1202 | <p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1203 | You should consider using <em>dcommit</em> instead of this command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1204 | Commit specified commit or tree objects to SVN. This relies on |
| 1205 | your imported fetch data being up-to-date. This makes |
| 1206 | absolutely no attempts to do patching when committing to SVN, it |
| 1207 | simply overwrites files with those specified in the tree or |
| 1208 | commit. All merging is assumed to have taken place |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1209 | independently of <em>git svn</em> functions. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1210 | </p> |
| 1211 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1212 | <dt class="hdlist1"> |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1213 | <em>create-ignore</em> |
| 1214 | </dt> |
| 1215 | <dd> |
| 1216 | <p> |
| 1217 | Recursively finds the svn:ignore property on directories and |
| 1218 | creates matching .gitignore files. The resulting files are staged to |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 1219 | be committed, but are not committed. Use -r/--revision to refer to a |
Junio C Hamano | cb1c44f | 2008-08-06 06:19:33 | [diff] [blame] | 1220 | specific revision. |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 1221 | </p> |
| 1222 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1223 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1224 | <em>show-ignore</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1225 | </dt> |
| 1226 | <dd> |
| 1227 | <p> |
| 1228 | Recursively finds and lists the svn:ignore property on |
| 1229 | directories. The output is suitable for appending to |
| 1230 | the $GIT_DIR/info/exclude file. |
| 1231 | </p> |
| 1232 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1233 | <dt class="hdlist1"> |
Junio C Hamano | a557446 | 2009-11-18 07:39:28 | [diff] [blame] | 1234 | <em>mkdirs</em> |
| 1235 | </dt> |
| 1236 | <dd> |
| 1237 | <p> |
| 1238 | Attempts to recreate empty directories that core git cannot track |
| 1239 | based on information in $GIT_DIR/svn/<refname>/unhandled.log files. |
| 1240 | Empty directories are automatically recreated when using |
| 1241 | "git svn clone" and "git svn rebase", so "mkdirs" is intended |
| 1242 | for use after commands like "git checkout" or "git reset". |
Junio C Hamano | 209ebe8 | 2011-04-27 21:09:59 | [diff] [blame] | 1243 | (See the svn-remote.<name>.automkdirs config file option for |
| 1244 | more information.) |
Junio C Hamano | a557446 | 2009-11-18 07:39:28 | [diff] [blame] | 1245 | </p> |
| 1246 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1247 | <dt class="hdlist1"> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1248 | <em>commit-diff</em> |
| 1249 | </dt> |
| 1250 | <dd> |
| 1251 | <p> |
| 1252 | Commits the diff of two tree-ish arguments from the |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1253 | command-line. This command does not rely on being inside an <tt>git svn |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1254 | init</tt>-ed repository. This command takes three arguments, (a) the |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1255 | original tree to diff against, (b) the new tree result, (c) the |
| 1256 | URL of the target Subversion repository. The final argument |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1257 | (URL) may be omitted if you are working from a <em>git svn</em>-aware |
| 1258 | repository (that has been <tt>init</tt>-ed with <em>git svn</em>). |
Junio C Hamano | 23db885 | 2006-11-09 23:35:53 | [diff] [blame] | 1259 | The -r<revision> option is required for this. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1260 | </p> |
| 1261 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1262 | <dt class="hdlist1"> |
Junio C Hamano | a097054 | 2007-11-23 08:43:30 | [diff] [blame] | 1263 | <em>info</em> |
| 1264 | </dt> |
| 1265 | <dd> |
| 1266 | <p> |
| 1267 | Shows information about a file or directory similar to what |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1268 | ‘svn info’ provides. Does not currently support a -r/--revision |
Junio C Hamano | a097054 | 2007-11-23 08:43:30 | [diff] [blame] | 1269 | argument. Use the --url option to output only the value of the |
| 1270 | <em>URL:</em> field. |
| 1271 | </p> |
| 1272 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1273 | <dt class="hdlist1"> |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 1274 | <em>proplist</em> |
| 1275 | </dt> |
| 1276 | <dd> |
| 1277 | <p> |
| 1278 | Lists the properties stored in the Subversion repository about a |
| 1279 | given file or directory. Use -r/--revision to refer to a specific |
| 1280 | Subversion revision. |
| 1281 | </p> |
| 1282 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1283 | <dt class="hdlist1"> |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 1284 | <em>propget</em> |
| 1285 | </dt> |
| 1286 | <dd> |
| 1287 | <p> |
| 1288 | Gets the Subversion property given as the first argument, for a |
| 1289 | file. A specific revision can be specified with -r/--revision. |
| 1290 | </p> |
| 1291 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1292 | <dt class="hdlist1"> |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 1293 | <em>show-externals</em> |
| 1294 | </dt> |
| 1295 | <dd> |
| 1296 | <p> |
| 1297 | Shows the Subversion externals. Use -r/--revision to specify a |
| 1298 | specific revision. |
| 1299 | </p> |
| 1300 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1301 | <dt class="hdlist1"> |
Junio C Hamano | aa2cd76 | 2009-07-26 08:14:01 | [diff] [blame] | 1302 | <em>gc</em> |
| 1303 | </dt> |
| 1304 | <dd> |
| 1305 | <p> |
| 1306 | Compress $GIT_DIR/svn/<refname>/unhandled.log files in .git/svn |
| 1307 | and remove $GIT_DIR/svn/<refname>index files in .git/svn. |
| 1308 | </p> |
| 1309 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1310 | <dt class="hdlist1"> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1311 | <em>reset</em> |
| 1312 | </dt> |
| 1313 | <dd> |
| 1314 | <p> |
| 1315 | Undoes the effects of <em>fetch</em> back to the specified revision. |
| 1316 | This allows you to re-<em>fetch</em> an SVN revision. Normally the |
| 1317 | contents of an SVN revision should never change and <em>reset</em> |
| 1318 | should not be necessary. However, if SVN permissions change, |
| 1319 | or if you alter your --ignore-paths option, a <em>fetch</em> may fail |
| 1320 | with "not found in commit" (file not previously visible) or |
| 1321 | "checksum mismatch" (missed a modification). If the problem |
| 1322 | file cannot be ignored forever (with --ignore-paths) the only |
| 1323 | way to repair the repo is to use <em>reset</em>. |
| 1324 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1325 | <div class="paragraph"><p>Only the rev_map and refs/remotes/git-svn are changed. Follow <em>reset</em> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1326 | with a <em>fetch</em> and then <em>git reset</em> or <em>git rebase</em> to move local |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1327 | branches onto the new tree.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1328 | <div class="dlist"><dl> |
| 1329 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1330 | -r <n> |
| 1331 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1332 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1333 | --revision=<n> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1334 | </dt> |
| 1335 | <dd> |
| 1336 | <p> |
| 1337 | Specify the most recent revision to keep. All later revisions |
| 1338 | are discarded. |
| 1339 | </p> |
| 1340 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1341 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1342 | -p |
| 1343 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1344 | <dt class="hdlist1"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1345 | --parent |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1346 | </dt> |
| 1347 | <dd> |
| 1348 | <p> |
| 1349 | Discard the specified revision as well, keeping the nearest |
| 1350 | parent instead. |
| 1351 | </p> |
| 1352 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1353 | <dt class="hdlist1"> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1354 | Example: |
| 1355 | </dt> |
| 1356 | <dd> |
| 1357 | <p> |
| 1358 | Assume you have local changes in "master", but you need to refetch "r2". |
| 1359 | </p> |
| 1360 | <div class="listingblock"> |
| 1361 | <div class="content"> |
| 1362 | <pre><tt> r1---r2---r3 remotes/git-svn |
| 1363 | \ |
| 1364 | A---B master</tt></pre> |
| 1365 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1366 | <div class="paragraph"><p>Fix the ignore-paths or SVN permissions problem that caused "r2" to |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1367 | be incomplete in the first place. Then:</p></div> |
| 1368 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1369 | <div class="verseblock-content">git svn reset -r2 -p |
| 1370 | git svn fetch</div> |
| 1371 | <div class="verseblock-attribution"> |
| 1372 | </div></div> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1373 | <div class="listingblock"> |
| 1374 | <div class="content"> |
| 1375 | <pre><tt> r1---r2'--r3' remotes/git-svn |
| 1376 | \ |
| 1377 | r2---r3---A---B master</tt></pre> |
| 1378 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1379 | <div class="paragraph"><p>Then fixup "master" with <em>git rebase</em>. |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1380 | Do NOT use <em>git merge</em> or your history will not be compatible with a |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1381 | future <em>dcommit</em>!</p></div> |
| 1382 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1383 | <div class="verseblock-content">git rebase --onto remotes/git-svn A^ master</div> |
| 1384 | <div class="verseblock-attribution"> |
| 1385 | </div></div> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1386 | <div class="listingblock"> |
| 1387 | <div class="content"> |
| 1388 | <pre><tt> r1---r2'--r3' remotes/git-svn |
| 1389 | \ |
| 1390 | A'--B' master</tt></pre> |
| 1391 | </div></div> |
| 1392 | </dd> |
| 1393 | </dl></div> |
| 1394 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1395 | </dl></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1396 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1397 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1398 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1399 | <div class="dlist"><dl> |
| 1400 | <dt class="hdlist1"> |
Junio C Hamano | d2179ef | 2010-10-22 04:12:17 | [diff] [blame] | 1401 | --shared[=(false|true|umask|group|all|world|everybody)] |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1402 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1403 | <dt class="hdlist1"> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1404 | --template=<template_directory> |
| 1405 | </dt> |
| 1406 | <dd> |
| 1407 | <p> |
| 1408 | Only used with the <em>init</em> command. |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1409 | These are passed directly to <em>git init</em>. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1410 | </p> |
| 1411 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1412 | <dt class="hdlist1"> |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 1413 | -r <arg> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1414 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1415 | <dt class="hdlist1"> |
Junio C Hamano | 63c2bc9 | 2011-02-28 06:41:28 | [diff] [blame] | 1416 | --revision <arg> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1417 | </dt> |
| 1418 | <dd> |
| 1419 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1420 | Used with the <em>fetch</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1421 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1422 | <div class="paragraph"><p>This allows revision ranges for partial/cauterized history |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1423 | to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges), |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1424 | $NUMBER:HEAD, and BASE:$NUMBER are all supported.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1425 | <div class="paragraph"><p>This can allow you to make partial mirrors when running fetch; |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1426 | but is generally not recommended because history will be skipped |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1427 | and lost.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1428 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1429 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1430 | - |
| 1431 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1432 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1433 | --stdin |
| 1434 | </dt> |
| 1435 | <dd> |
| 1436 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1437 | Only used with the <em>set-tree</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1438 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1439 | <div class="paragraph"><p>Read a list of commits from stdin and commit them in reverse |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1440 | order. Only the leading sha1 is read from each line, so |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1441 | <em>git rev-list --pretty=oneline</em> output can be used.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1442 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1443 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1444 | --rmdir |
| 1445 | </dt> |
| 1446 | <dd> |
| 1447 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1448 | Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1449 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1450 | <div class="paragraph"><p>Remove directories from the SVN tree if there are no files left |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1451 | behind. SVN can version empty directories, and they are not |
| 1452 | removed by default if there are no files left in them. git |
| 1453 | cannot version empty directories. Enabling this flag will make |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1454 | the commit to SVN act like git.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1455 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1456 | <div class="verseblock-content">config key: svn.rmdir</div> |
| 1457 | <div class="verseblock-attribution"> |
| 1458 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1459 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1460 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1461 | -e |
| 1462 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1463 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1464 | --edit |
| 1465 | </dt> |
| 1466 | <dd> |
| 1467 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1468 | Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1469 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1470 | <div class="paragraph"><p>Edit the commit message before committing to SVN. This is off by |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1471 | default for objects that are commits, and forced on when committing |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1472 | tree objects.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1473 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1474 | <div class="verseblock-content">config key: svn.edit</div> |
| 1475 | <div class="verseblock-attribution"> |
| 1476 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1477 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1478 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1479 | -l<num> |
| 1480 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1481 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1482 | --find-copies-harder |
| 1483 | </dt> |
| 1484 | <dd> |
| 1485 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1486 | Only used with the <em>dcommit</em>, <em>set-tree</em> and <em>commit-diff</em> commands. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1487 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1488 | <div class="paragraph"><p>They are both passed directly to <em>git diff-tree</em>; see |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1489 | <a href="git-diff-tree.html">git-diff-tree(1)</a> for more information.</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1490 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1491 | <div class="verseblock-content">config key: svn.l |
| 1492 | config key: svn.findcopiesharder</div> |
| 1493 | <div class="verseblock-attribution"> |
| 1494 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1495 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1496 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1497 | -A<filename> |
| 1498 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1499 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1500 | --authors-file=<filename> |
| 1501 | </dt> |
| 1502 | <dd> |
| 1503 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1504 | Syntax is compatible with the file used by <em>git cvsimport</em>: |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1505 | </p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1506 | <div class="listingblock"> |
| 1507 | <div class="content"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1508 | <pre><tt> loginname = Joe User <user@example.com></tt></pre> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1509 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1510 | <div class="paragraph"><p>If this option is specified and <em>git svn</em> encounters an SVN |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1511 | committer name that does not exist in the authors-file, <em>git svn</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1512 | will abort operation. The user will then have to add the |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1513 | appropriate entry. Re-running the previous <em>git svn</em> command |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1514 | after the authors-file is modified should continue operation.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1515 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1516 | <div class="verseblock-content">config key: svn.authorsfile</div> |
| 1517 | <div class="verseblock-attribution"> |
| 1518 | </div></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1519 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1520 | <dt class="hdlist1"> |
Junio C Hamano | 52d5def | 2009-05-21 16:27:43 | [diff] [blame] | 1521 | --authors-prog=<filename> |
| 1522 | </dt> |
| 1523 | <dd> |
| 1524 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1525 | If this option is specified, for each SVN committer name that |
| 1526 | does not exist in the authors file, the given file is executed |
| 1527 | with the committer name as the first argument. The program is |
| 1528 | expected to return a single line of the form "Name <email>", |
| 1529 | which will be treated as if included in the authors file. |
Junio C Hamano | 52d5def | 2009-05-21 16:27:43 | [diff] [blame] | 1530 | </p> |
| 1531 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1532 | <dt class="hdlist1"> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1533 | -q |
| 1534 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1535 | <dt class="hdlist1"> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1536 | --quiet |
| 1537 | </dt> |
| 1538 | <dd> |
| 1539 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1540 | Make <em>git svn</em> less verbose. Specify a second time to make it |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1541 | even less verbose. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1542 | </p> |
| 1543 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1544 | <dt class="hdlist1"> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1545 | --repack[=<n>] |
| 1546 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1547 | <dt class="hdlist1"> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1548 | --repack-flags=<flags> |
| 1549 | </dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1550 | <dd> |
| 1551 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1552 | These should help keep disk usage sane for large fetches with |
| 1553 | many revisions. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1554 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1555 | <div class="paragraph"><p>--repack takes an optional argument for the number of revisions |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1556 | to fetch before repacking. This defaults to repacking every |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1557 | 1000 commits fetched if no argument is specified.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1558 | <div class="paragraph"><p>--repack-flags are passed directly to <em>git repack</em>.</p></div> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1559 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1560 | <div class="verseblock-content">config key: svn.repack |
| 1561 | config key: svn.repackflags</div> |
| 1562 | <div class="verseblock-attribution"> |
| 1563 | </div></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1564 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1565 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1566 | -m |
| 1567 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1568 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1569 | --merge |
| 1570 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1571 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1572 | -s<strategy> |
| 1573 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1574 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1575 | --strategy=<strategy> |
| 1576 | </dt> |
Junio C Hamano | f94fd6c | 2012-05-17 22:55:14 | [diff] [blame] | 1577 | <dt class="hdlist1"> |
| 1578 | -p |
| 1579 | </dt> |
| 1580 | <dt class="hdlist1"> |
| 1581 | --preserve-merges |
| 1582 | </dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1583 | <dd> |
| 1584 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1585 | These are only used with the <em>dcommit</em> and <em>rebase</em> commands. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1586 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1587 | <div class="paragraph"><p>Passed directly to <em>git rebase</em> when using <em>dcommit</em> if a |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1588 | <em>git reset</em> cannot be used (see <em>dcommit</em>).</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1589 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1590 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1591 | -n |
| 1592 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1593 | <dt class="hdlist1"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1594 | --dry-run |
| 1595 | </dt> |
| 1596 | <dd> |
| 1597 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1598 | This can be used with the <em>dcommit</em>, <em>rebase</em>, <em>branch</em> and |
| 1599 | <em>tag</em> commands. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1600 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1601 | <div class="paragraph"><p>For <em>dcommit</em>, print out the series of git arguments that would show |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1602 | which diffs would be committed to SVN.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1603 | <div class="paragraph"><p>For <em>rebase</em>, display the local branch associated with the upstream svn |
Junio C Hamano | 9e1793f | 2008-06-02 07:31:16 | [diff] [blame] | 1604 | repository associated with the current branch and the URL of svn |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1605 | repository that will be fetched from.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1606 | <div class="paragraph"><p>For <em>branch</em> and <em>tag</em>, display the urls that will be used for copying when |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1607 | creating the branch or tag.</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1608 | </dd> |
Junio C Hamano | 4f01892 | 2011-05-01 23:54:06 | [diff] [blame] | 1609 | <dt class="hdlist1"> |
| 1610 | --use-log-author |
| 1611 | </dt> |
| 1612 | <dd> |
| 1613 | <p> |
| 1614 | When retrieving svn commits into git (as part of <em>fetch</em>, <em>rebase</em>, or |
| 1615 | <em>dcommit</em> operations), look for the first <tt>From:</tt> or <tt>Signed-off-by:</tt> line |
| 1616 | in the log message and use that as the author string. |
| 1617 | </p> |
| 1618 | </dd> |
| 1619 | <dt class="hdlist1"> |
| 1620 | --add-author-from |
| 1621 | </dt> |
| 1622 | <dd> |
| 1623 | <p> |
| 1624 | When committing to svn from git (as part of <em>commit-diff</em>, <em>set-tree</em> or <em>dcommit</em> |
| 1625 | operations), if the existing log message doesn’t already have a |
| 1626 | <tt>From:</tt> or <tt>Signed-off-by:</tt> line, append a <tt>From:</tt> line based on the |
| 1627 | git commit’s author string. If you use this, then <tt>--use-log-author</tt> |
| 1628 | will retrieve a valid author string for all commits. |
| 1629 | </p> |
| 1630 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1631 | </dl></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1632 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1633 | <h2 id="_advanced_options">ADVANCED OPTIONS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1634 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1635 | <div class="dlist"><dl> |
| 1636 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1637 | -i<GIT_SVN_ID> |
| 1638 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1639 | <dt class="hdlist1"> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1640 | --id <GIT_SVN_ID> |
| 1641 | </dt> |
| 1642 | <dd> |
| 1643 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1644 | This sets GIT_SVN_ID (instead of using the environment). This |
| 1645 | allows the user to override the default refname to fetch from |
| 1646 | when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands |
| 1647 | no longer require this switch as an argument. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1648 | </p> |
| 1649 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1650 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1651 | -R<remote name> |
| 1652 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1653 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1654 | --svn-remote <remote name> |
| 1655 | </dt> |
| 1656 | <dd> |
| 1657 | <p> |
| 1658 | Specify the [svn-remote "<remote name>"] section to use, |
| 1659 | this allows SVN multiple repositories to be tracked. |
| 1660 | Default: "svn" |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1661 | </p> |
| 1662 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1663 | <dt class="hdlist1"> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1664 | --follow-parent |
| 1665 | </dt> |
| 1666 | <dd> |
| 1667 | <p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1668 | This is especially helpful when we’re tracking a directory |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1669 | that has been moved around within the repository, or if we |
| 1670 | started tracking a branch and never tracked the trunk it was |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1671 | descended from. This feature is enabled by default, use |
| 1672 | --no-follow-parent to disable it. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1673 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1674 | <div class="verseblock"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1675 | <div class="verseblock-content">config key: svn.followparent</div> |
| 1676 | <div class="verseblock-attribution"> |
| 1677 | </div></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1678 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1679 | </dl></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1680 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1681 | <h2 id="_config_file_only_options">CONFIG FILE-ONLY OPTIONS</h2> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1682 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1683 | <div class="dlist"><dl> |
| 1684 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1685 | svn.noMetadata |
| 1686 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1687 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1688 | svn-remote.<name>.noMetadata |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1689 | </dt> |
| 1690 | <dd> |
| 1691 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1692 | This gets rid of the <em>git-svn-id:</em> lines at the end of every commit. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1693 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1694 | <div class="paragraph"><p>This option can only be used for one-shot imports as <em>git svn</em> |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1695 | will not be able to fetch again without metadata. Additionally, |
| 1696 | if you lose your .git/svn/<strong>*/.rev_map.</strong> files, <em>git svn</em> will not |
| 1697 | be able to rebuild them.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1698 | <div class="paragraph"><p>The <em>git svn log</em> command will not work on repositories using |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1699 | this, either. Using this conflicts with the <em>useSvmProps</em> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1700 | option for (hopefully) obvious reasons.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1701 | <div class="paragraph"><p>This option is NOT recommended as it makes it difficult to track down |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1702 | old references to SVN revision numbers in existing documentation, bug |
| 1703 | reports and archives. If you plan to eventually migrate from SVN to git |
| 1704 | and are certain about dropping SVN history, consider |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1705 | <a href="git-filter-branch.html">git-filter-branch(1)</a> instead. filter-branch also allows |
Junio C Hamano | 7165bf7 | 2011-01-04 22:06:18 | [diff] [blame] | 1706 | reformatting of metadata for ease-of-reading and rewriting authorship |
Junio C Hamano | 657fd8a | 2010-10-07 00:01:24 | [diff] [blame] | 1707 | info for non-"svn.authorsFile" users.</p></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1708 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1709 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1710 | svn.useSvmProps |
| 1711 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1712 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1713 | svn-remote.<name>.useSvmProps |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1714 | </dt> |
| 1715 | <dd> |
| 1716 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1717 | This allows <em>git svn</em> to re-map repository URLs and UUIDs from |
| 1718 | mirrors created using SVN::Mirror (or svk) for metadata. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1719 | </p> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1720 | <div class="paragraph"><p>If an SVN revision has a property, "svm:headrev", it is likely |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1721 | that the revision was created by SVN::Mirror (also used by SVK). |
| 1722 | The property contains a repository UUID and a revision. We want |
| 1723 | to make it look like we are mirroring the original URL, so |
| 1724 | introduce a helper function that returns the original identity |
| 1725 | URL and UUID, and use it when generating metadata in commit |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1726 | messages.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1727 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1728 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1729 | svn.useSvnsyncProps |
| 1730 | </dt> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1731 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1732 | svn-remote.<name>.useSvnsyncprops |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 1733 | </dt> |
| 1734 | <dd> |
| 1735 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1736 | Similar to the useSvmProps option; this is for users |
| 1737 | of the svnsync(1) command distributed with SVN 1.4.x and |
| 1738 | later. |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 1739 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1740 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1741 | <dt class="hdlist1"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1742 | svn-remote.<name>.rewriteRoot |
| 1743 | </dt> |
| 1744 | <dd> |
| 1745 | <p> |
| 1746 | This allows users to create repositories from alternate |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1747 | URLs. For example, an administrator could run <em>git svn</em> on the |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1748 | server locally (accessing via file://) but wish to distribute |
| 1749 | the repository with a public http:// or svn:// URL in the |
| 1750 | metadata so users of it will see the public URL. |
| 1751 | </p> |
Junio C Hamano | 0538b89 | 2008-06-20 04:18:33 | [diff] [blame] | 1752 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1753 | <dt class="hdlist1"> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1754 | svn-remote.<name>.rewriteUUID |
| 1755 | </dt> |
| 1756 | <dd> |
| 1757 | <p> |
| 1758 | Similar to the useSvmProps option; this is for users who need |
| 1759 | to remap the UUID manually. This may be useful in situations |
| 1760 | where the original UUID is not available via either useSvmProps |
| 1761 | or useSvnsyncProps. |
| 1762 | </p> |
| 1763 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1764 | <dt class="hdlist1"> |
Junio C Hamano | f7e049c | 2011-04-11 23:48:36 | [diff] [blame] | 1765 | svn-remote.<name>.pushurl |
| 1766 | </dt> |
| 1767 | <dd> |
| 1768 | <p> |
| 1769 | Similar to git’s <em>remote.<name>.pushurl</em>, this key is designed |
| 1770 | to be used in cases where <em>url</em> points to an SVN repository |
| 1771 | via a read-only transport, to provide an alternate read/write |
| 1772 | transport. It is assumed that both keys point to the same |
| 1773 | repository. Unlike <em>commiturl</em>, <em>pushurl</em> is a base path. If |
| 1774 | either <em>commiturl</em> or <em>pushurl</em> could be used, <em>commiturl</em> |
| 1775 | takes precedence. |
| 1776 | </p> |
| 1777 | </dd> |
| 1778 | <dt class="hdlist1"> |
Junio C Hamano | b325006 | 2009-02-11 20:16:50 | [diff] [blame] | 1779 | svn.brokenSymlinkWorkaround |
| 1780 | </dt> |
| 1781 | <dd> |
| 1782 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1783 | This disables potentially expensive checks to workaround |
| 1784 | broken symlinks checked into SVN by broken clients. Set this |
| 1785 | option to "false" if you track a SVN repository with many |
| 1786 | empty blobs that are not symlinks. This option may be changed |
| 1787 | while <em>git svn</em> is running and take effect on the next |
| 1788 | revision fetched. If unset, <em>git svn</em> assumes this option to |
| 1789 | be "true". |
Junio C Hamano | b325006 | 2009-02-11 20:16:50 | [diff] [blame] | 1790 | </p> |
| 1791 | </dd> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1792 | <dt class="hdlist1"> |
Junio C Hamano | a978876 | 2010-08-03 15:15:54 | [diff] [blame] | 1793 | svn.pathnameencoding |
| 1794 | </dt> |
| 1795 | <dd> |
| 1796 | <p> |
| 1797 | This instructs git svn to recode pathnames to a given encoding. |
| 1798 | It can be used by windows users and by those who work in non-utf8 |
| 1799 | locales to avoid corrupted file names with non-ASCII characters. |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1800 | Valid encodings are the ones supported by Perl’s Encode module. |
Junio C Hamano | a978876 | 2010-08-03 15:15:54 | [diff] [blame] | 1801 | </p> |
| 1802 | </dd> |
Junio C Hamano | 209ebe8 | 2011-04-27 21:09:59 | [diff] [blame] | 1803 | <dt class="hdlist1"> |
| 1804 | svn-remote.<name>.automkdirs |
| 1805 | </dt> |
| 1806 | <dd> |
| 1807 | <p> |
| 1808 | Normally, the "git svn clone" and "git svn rebase" commands |
| 1809 | attempt to recreate empty directories that are in the |
| 1810 | Subversion repository. If this option is set to "false", then |
| 1811 | empty directories will only be created if the "git svn mkdirs" |
| 1812 | command is run explicitly. If unset, <em>git svn</em> assumes this |
| 1813 | option to be "true". |
| 1814 | </p> |
| 1815 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1816 | </dl></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1817 | <div class="paragraph"><p>Since the noMetadata, rewriteRoot, rewriteUUID, useSvnsyncProps and useSvmProps |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1818 | options all affect the metadata generated and used by <em>git svn</em>; they |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1819 | <strong>must</strong> be set in the configuration file before any history is imported |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1820 | and these settings should never be changed once they are set.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1821 | <div class="paragraph"><p>Additionally, only one of these options can be used per svn-remote |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1822 | section because they affect the <em>git-svn-id:</em> metadata line, except |
| 1823 | for rewriteRoot and rewriteUUID which can be used together.</p></div> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1824 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1825 | <h2 id="_basic_examples">BASIC EXAMPLES</h2> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1826 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1827 | <div class="paragraph"><p>Tracking and contributing to the trunk of a Subversion-managed project:</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1828 | <div class="listingblock"> |
| 1829 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1830 | <pre><tt># Clone a repo (like git clone): |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1831 | git svn clone http://svn.example.com/project/trunk |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1832 | # Enter the newly cloned directory: |
| 1833 | cd trunk |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1834 | # You should be on master branch, double-check with 'git branch' |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1835 | git branch |
| 1836 | # Do some work and commit locally to git: |
| 1837 | git commit ... |
| 1838 | # Something is committed to SVN, rebase your local changes against the |
| 1839 | # latest changes in SVN: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1840 | git svn rebase |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1841 | # Now commit your changes (that were committed previously using git) to SVN, |
| 1842 | # as well as automatically updating your working HEAD: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1843 | git svn dcommit |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1844 | # Append svn:ignore settings to the default git exclude file: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1845 | git svn show-ignore >> .git/info/exclude</tt></pre> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1846 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1847 | <div class="paragraph"><p>Tracking and contributing to an entire Subversion-managed project |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1848 | (complete with a trunk, tags and branches):</p></div> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 1849 | <div class="listingblock"> |
| 1850 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1851 | <pre><tt># Clone a repo (like git clone): |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1852 | git svn clone http://svn.example.com/project -T trunk -b branches -t tags |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1853 | # View all branches and tags you have cloned: |
| 1854 | git branch -r |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1855 | # Create a new branch in SVN |
| 1856 | git svn branch waldo |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1857 | # Reset your master to trunk (or any other branch, replacing 'trunk' |
| 1858 | # with the appropriate name): |
| 1859 | git reset --hard remotes/trunk |
| 1860 | # You may only dcommit to one branch/tag/trunk at a time. The usage |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1861 | # of dcommit/rebase/show-ignore should be the same as above.</tt></pre> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 1862 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1863 | <div class="paragraph"><p>The initial <em>git svn clone</em> can be quite time-consuming |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1864 | (especially for large Subversion repositories). If multiple |
| 1865 | people (or one person with multiple machines) want to use |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1866 | <em>git svn</em> to interact with the same Subversion repository, you can |
| 1867 | do the initial <em>git svn clone</em> to a repository on a server and |
| 1868 | have each person clone that repository with <em>git clone</em>:</p></div> |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1869 | <div class="listingblock"> |
| 1870 | <div class="content"> |
| 1871 | <pre><tt># Do the initial import on a server |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1872 | ssh server "cd /pub && git svn clone http://svn.example.com/project |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1873 | # Clone locally - make sure the refs/remotes/ space matches the server |
| 1874 | mkdir project |
| 1875 | cd project |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1876 | git init |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1877 | git remote add origin server:/pub/project |
Junio C Hamano | b218ad8 | 2011-01-08 00:21:03 | [diff] [blame] | 1878 | git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*' |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1879 | git fetch |
Junio C Hamano | b218ad8 | 2011-01-08 00:21:03 | [diff] [blame] | 1880 | # Prevent fetch/pull from remote git server in the future, |
| 1881 | # we only want to use git svn for future updates |
| 1882 | git config --remove-section remote.origin |
Junio C Hamano | d3452a0 | 2008-11-15 08:07:55 | [diff] [blame] | 1883 | # Create a local branch from one of the branches just fetched |
| 1884 | git checkout -b master FETCH_HEAD |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1885 | # Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server) |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1886 | git svn init http://svn.example.com/project |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1887 | # Pull the latest changes from Subversion |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1888 | git svn rebase</tt></pre> |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1889 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1890 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1891 | <h2 id="_rebase_vs_pull_merge">REBASE VS. PULL/MERGE</h2> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1892 | <div class="sectionbody"> |
Junio C Hamano | f94fd6c | 2012-05-17 22:55:14 | [diff] [blame] | 1893 | <div class="paragraph"><p>Prefer to use <em>git svn rebase</em> or <em>git rebase</em>, rather than |
| 1894 | <em>git pull</em> or <em>git merge</em> to synchronize unintegrated commits with a <em>git svn</em> |
| 1895 | branch. Doing so will keep the history of unintegrated commits linear with |
| 1896 | respect to the upstream SVN repository and allow the use of the preferred |
| 1897 | <em>git svn dcommit</em> subcommand to push unintegrated commits back into SVN.</p></div> |
| 1898 | <div class="paragraph"><p>Originally, <em>git svn</em> recommended that developers pulled or merged from |
| 1899 | the <em>git svn</em> branch. This was because the author favored |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1900 | <tt>git svn set-tree B</tt> to commit a single head rather than the |
Junio C Hamano | f94fd6c | 2012-05-17 22:55:14 | [diff] [blame] | 1901 | <tt>git svn set-tree A..B</tt> notation to commit multiple commits. Use of |
| 1902 | <em>git pull</em> or <em>git merge</em> with <tt>git svn set-tree A..B</tt> will cause non-linear |
| 1903 | history to be flattened when committing into SVN and this can lead to merge |
| 1904 | commits unexpectedly reversing previous commits in SVN.</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1905 | </div> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1906 | <h2 id="_merge_tracking">MERGE TRACKING</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1907 | <div class="sectionbody"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1908 | <div class="paragraph"><p>While <em>git svn</em> can track |
Junio C Hamano | d2d9ae1 | 2007-09-19 02:27:57 | [diff] [blame] | 1909 | copy history (including branches and tags) for repositories adopting a |
| 1910 | standard layout, it cannot yet represent merge history that happened |
| 1911 | inside git back upstream to SVN users. Therefore it is advised that |
| 1912 | users keep history as linear as possible inside git to ease |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1913 | compatibility with SVN (see the CAVEATS section below).</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1914 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1915 | <h2 id="_caveats">CAVEATS</h2> |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1916 | <div class="sectionbody"> |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1917 | <div class="paragraph"><p>For the sake of simplicity and interoperating with Subversion, |
| 1918 | it is recommended that all <em>git svn</em> users clone, fetch and dcommit |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1919 | directly from the SVN server, and avoid all <em>git clone</em>/<em>pull</em>/<em>merge</em>/<em>push</em> |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1920 | operations between git repositories and branches. The recommended |
| 1921 | method of exchanging code between git branches and users is |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1922 | <em>git format-patch</em> and <em>git am</em>, or just 'dcommit’ing to the SVN repository.</p></div> |
| 1923 | <div class="paragraph"><p>Running <em>git merge</em> or <em>git pull</em> is NOT recommended on a branch you |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1924 | plan to <em>dcommit</em> from because Subversion users cannot see any |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1925 | merges you’ve made. Furthermore, if you merge or pull from a git branch |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1926 | that is a mirror of an SVN branch, <em>dcommit</em> may commit to the wrong |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1927 | branch.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1928 | <div class="paragraph"><p>If you do merge, note the following rule: <em>git svn dcommit</em> will |
Junio C Hamano | a557446 | 2009-11-18 07:39:28 | [diff] [blame] | 1929 | attempt to commit on top of the SVN commit named in</p></div> |
| 1930 | <div class="listingblock"> |
| 1931 | <div class="content"> |
| 1932 | <pre><tt>git log --grep=^git-svn-id: --first-parent -1</tt></pre> |
| 1933 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1934 | <div class="paragraph"><p>You <em>must</em> therefore ensure that the most recent commit of the branch |
Junio C Hamano | a557446 | 2009-11-18 07:39:28 | [diff] [blame] | 1935 | you want to dcommit to is the <em>first</em> parent of the merge. Chaos will |
| 1936 | ensue otherwise, especially if the first parent is an older commit on |
| 1937 | the same SVN branch.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1938 | <div class="paragraph"><p><em>git clone</em> does not clone branches under the refs/remotes/ hierarchy or |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1939 | any <em>git svn</em> metadata, or config. So repositories created and managed with |
| 1940 | using <em>git svn</em> should use <em>rsync</em> for cloning, if cloning is to be done |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1941 | at all.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1942 | <div class="paragraph"><p>Since <em>dcommit</em> uses rebase internally, any git branches you <em>git push</em> to |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1943 | before <em>dcommit</em> on will require forcing an overwrite of the existing ref |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1944 | on the remote repository. This is generally considered bad practice, |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 1945 | see the <a href="git-push.html">git-push(1)</a> documentation for details.</p></div> |
| 1946 | <div class="paragraph"><p>Do not use the --amend option of <a href="git-commit.html">git-commit(1)</a> on a change you’ve |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1947 | already dcommitted. It is considered bad practice to --amend commits |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1948 | you’ve already pushed to a remote repository for other users, and |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1949 | dcommit with SVN is analogous to that.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1950 | <div class="paragraph"><p>When using multiple --branches or --tags, <em>git svn</em> does not automatically |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1951 | handle name collisions (for example, if two branches from different paths have |
| 1952 | the same name, or if a branch and a tag have the same name). In these cases, |
| 1953 | use <em>init</em> to set up your git repository then, before your first <em>fetch</em>, edit |
| 1954 | the .git/config file so that the branches and tags are associated with |
| 1955 | different name spaces. For example:</p></div> |
| 1956 | <div class="literalblock"> |
| 1957 | <div class="content"> |
| 1958 | <pre><tt>branches = stable/*:refs/remotes/svn/stable/* |
| 1959 | branches = debug/*:refs/remotes/svn/debug/*</tt></pre> |
| 1960 | </div></div> |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1961 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1962 | <h2 id="_bugs">BUGS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1963 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1964 | <div class="paragraph"><p>We ignore all SVN properties except svn:executable. Any unhandled |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1965 | properties are logged to $GIT_DIR/svn/<refname>/unhandled.log</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1966 | <div class="paragraph"><p>Renamed and copied directories are not detected by git and hence not |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1967 | tracked when committing to SVN. I do not plan on adding support for |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1968 | this as it’s quite difficult and time-consuming to get working for all |
| 1969 | the possible corner cases (git doesn’t do it, either). Committing |
Junio C Hamano | b77f819 | 2011-05-05 01:30:38 | [diff] [blame] | 1970 | renamed and copied files is fully supported if they’re similar enough |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1971 | for git to detect them.</p></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1972 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1973 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1974 | <div class="sectionbody"> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1975 | <div class="paragraph"><p><em>git svn</em> stores [svn-remote] configuration information in the |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1976 | repository .git/config file. It is similar the core git |
| 1977 | [remote] sections except <em>fetch</em> keys do not accept glob |
| 1978 | arguments; but they are instead handled by the <em>branches</em> |
| 1979 | and <em>tags</em> keys. Since some SVN repositories are oddly |
| 1980 | configured with multiple projects glob expansions such those |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1981 | listed below are allowed:</p></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1982 | <div class="listingblock"> |
| 1983 | <div class="content"> |
| 1984 | <pre><tt>[svn-remote "project-a"] |
| 1985 | url = http://server.org/svn |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1986 | fetch = trunk/project-a:refs/remotes/project-a/trunk |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1987 | branches = branches/*/project-a:refs/remotes/project-a/branches/* |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1988 | tags = tags/*/project-a:refs/remotes/project-a/tags/*</tt></pre> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1989 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1990 | <div class="paragraph"><p>Keep in mind that the <em>*</em> (asterisk) wildcard of the local ref |
| 1991 | (right of the <em>:</em>) <strong>must</strong> be the farthest right path component; |
| 1992 | however the remote wildcard may be anywhere as long as it’s an |
Junio C Hamano | a638742 | 2007-08-25 03:54:27 | [diff] [blame] | 1993 | independent path component (surrounded by <em>/</em> or EOL). This |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1994 | type of configuration is not automatically created by <em>init</em> and |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1995 | should be manually entered with a text-editor or using <em>git config</em>.</p></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 1996 | <div class="paragraph"><p>It is also possible to fetch a subset of branches or tags by using a |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1997 | comma-separated list of names within braces. For example:</p></div> |
| 1998 | <div class="listingblock"> |
| 1999 | <div class="content"> |
| 2000 | <pre><tt>[svn-remote "huge-project"] |
| 2001 | url = http://server.org/svn |
| 2002 | fetch = trunk/src:refs/remotes/trunk |
| 2003 | branches = branches/{red,green}/src:refs/remotes/branches/* |
| 2004 | tags = tags/{1.0,2.0}/src:refs/remotes/tags/*</tt></pre> |
| 2005 | </div></div> |
Junio C Hamano | 68cf15a | 2010-11-06 01:01:59 | [diff] [blame] | 2006 | <div class="paragraph"><p>Note that git-svn keeps track of the highest revision in which a branch |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 2007 | or tag has appeared. If the subset of branches or tags is changed after |
| 2008 | fetching, then .git/svn/.metadata must be manually edited to remove (or |
| 2009 | reset) branches-maxRev and/or tags-maxRev as appropriate.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 2010 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 2011 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 2012 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2013 | <div class="paragraph"><p><a href="git-rebase.html">git-rebase(1)</a></p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 2014 | </div> |
Junio C Hamano | 5f3d839 | 2011-03-15 23:33:35 | [diff] [blame] | 2015 | <h2 id="_git">GIT</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 2016 | <div class="sectionbody"> |
Junio C Hamano | a28a920 | 2012-06-21 07:08:23 | [diff] [blame] | 2017 | <div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 2018 | </div> |
Junio C Hamano | 7bd050f | 2011-09-22 06:32:22 | [diff] [blame] | 2019 | </div> |
| 2020 | <div id="footnotes"><hr /></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 2021 | <div id="footer"> |
| 2022 | <div id="footer-text"> |
Junio C Hamano | a129545 | 2012-11-13 22:32:04 | [diff] [blame] | 2023 | Last updated 2012-11-13 14:31:09 PDT |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 2024 | </div> |
| 2025 | </div> |
| 2026 | </body> |
| 2027 | </html> |