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 | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 6 | <meta name="generator" content="AsciiDoc 8.2.5" /> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 7 | <style type="text/css"> |
| 8 | /* Debug borders */ |
| 9 | p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 { |
| 10 | /* |
| 11 | border: 1px solid red; |
| 12 | */ |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | margin: 1em 5% 1em 5%; |
| 17 | } |
| 18 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 19 | a { |
| 20 | color: blue; |
| 21 | text-decoration: underline; |
| 22 | } |
| 23 | a:visited { |
| 24 | color: fuchsia; |
| 25 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 26 | |
| 27 | em { |
| 28 | font-style: italic; |
| 29 | } |
| 30 | |
| 31 | strong { |
| 32 | font-weight: bold; |
| 33 | } |
| 34 | |
| 35 | tt { |
| 36 | color: navy; |
| 37 | } |
| 38 | |
| 39 | h1, h2, h3, h4, h5, h6 { |
| 40 | color: #527bbd; |
| 41 | font-family: sans-serif; |
| 42 | margin-top: 1.2em; |
| 43 | margin-bottom: 0.5em; |
| 44 | line-height: 1.3; |
| 45 | } |
| 46 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 47 | h1, h2, h3 { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 48 | border-bottom: 2px solid silver; |
| 49 | } |
| 50 | h2 { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 51 | padding-top: 0.5em; |
| 52 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 53 | h3 { |
| 54 | float: left; |
| 55 | } |
| 56 | h3 + * { |
| 57 | clear: left; |
| 58 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 59 | |
| 60 | div.sectionbody { |
| 61 | font-family: serif; |
| 62 | margin-left: 0; |
| 63 | } |
| 64 | |
| 65 | hr { |
| 66 | border: 1px solid silver; |
| 67 | } |
| 68 | |
| 69 | p { |
| 70 | margin-top: 0.5em; |
| 71 | margin-bottom: 0.5em; |
| 72 | } |
| 73 | |
| 74 | pre { |
| 75 | padding: 0; |
| 76 | margin: 0; |
| 77 | } |
| 78 | |
| 79 | span#author { |
| 80 | color: #527bbd; |
| 81 | font-family: sans-serif; |
| 82 | font-weight: bold; |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 83 | font-size: 1.1em; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 84 | } |
| 85 | span#email { |
| 86 | } |
| 87 | span#revision { |
| 88 | font-family: sans-serif; |
| 89 | } |
| 90 | |
| 91 | div#footer { |
| 92 | font-family: sans-serif; |
| 93 | font-size: small; |
| 94 | border-top: 2px solid silver; |
| 95 | padding-top: 0.5em; |
| 96 | margin-top: 4.0em; |
| 97 | } |
| 98 | div#footer-text { |
| 99 | float: left; |
| 100 | padding-bottom: 0.5em; |
| 101 | } |
| 102 | div#footer-badges { |
| 103 | float: right; |
| 104 | padding-bottom: 0.5em; |
| 105 | } |
| 106 | |
| 107 | div#preamble, |
| 108 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 109 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 110 | div.admonitionblock { |
| 111 | margin-right: 10%; |
| 112 | margin-top: 1.5em; |
| 113 | margin-bottom: 1.5em; |
| 114 | } |
| 115 | div.admonitionblock { |
| 116 | margin-top: 2.5em; |
| 117 | margin-bottom: 2.5em; |
| 118 | } |
| 119 | |
| 120 | div.content { /* Block element content. */ |
| 121 | padding: 0; |
| 122 | } |
| 123 | |
| 124 | /* Block element titles. */ |
| 125 | div.title, caption.title { |
| 126 | font-family: sans-serif; |
| 127 | font-weight: bold; |
| 128 | text-align: left; |
| 129 | margin-top: 1.0em; |
| 130 | margin-bottom: 0.5em; |
| 131 | } |
| 132 | div.title + * { |
| 133 | margin-top: 0; |
| 134 | } |
| 135 | |
| 136 | td div.title:first-child { |
| 137 | margin-top: 0.0em; |
| 138 | } |
| 139 | div.content div.title:first-child { |
| 140 | margin-top: 0.0em; |
| 141 | } |
| 142 | div.content + div.title { |
| 143 | margin-top: 0.0em; |
| 144 | } |
| 145 | |
| 146 | div.sidebarblock > div.content { |
| 147 | background: #ffffee; |
| 148 | border: 1px solid silver; |
| 149 | padding: 0.5em; |
| 150 | } |
| 151 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 152 | div.listingblock { |
| 153 | margin-right: 0%; |
| 154 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 155 | div.listingblock > div.content { |
| 156 | border: 1px solid silver; |
| 157 | background: #f4f4f4; |
| 158 | padding: 0.5em; |
| 159 | } |
| 160 | |
| 161 | div.quoteblock > div.content { |
| 162 | padding-left: 2.0em; |
| 163 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 164 | |
| 165 | div.attribution { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 166 | text-align: right; |
| 167 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 168 | div.verseblock + div.attribution { |
| 169 | text-align: left; |
| 170 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 171 | |
| 172 | div.admonitionblock .icon { |
| 173 | vertical-align: top; |
| 174 | font-size: 1.1em; |
| 175 | font-weight: bold; |
| 176 | text-decoration: underline; |
| 177 | color: #527bbd; |
| 178 | padding-right: 0.5em; |
| 179 | } |
| 180 | div.admonitionblock td.content { |
| 181 | padding-left: 0.5em; |
| 182 | border-left: 2px solid silver; |
| 183 | } |
| 184 | |
| 185 | div.exampleblock > div.content { |
| 186 | border-left: 2px solid silver; |
| 187 | padding: 0.5em; |
| 188 | } |
| 189 | |
| 190 | div.verseblock div.content { |
| 191 | white-space: pre; |
| 192 | } |
| 193 | |
| 194 | div.imageblock div.content { padding-left: 0; } |
| 195 | div.imageblock img { border: 1px solid silver; } |
| 196 | span.image img { border-style: none; } |
| 197 | |
| 198 | dl { |
| 199 | margin-top: 0.8em; |
| 200 | margin-bottom: 0.8em; |
| 201 | } |
| 202 | dt { |
| 203 | margin-top: 0.5em; |
| 204 | margin-bottom: 0; |
| 205 | font-style: italic; |
| 206 | } |
| 207 | dd > *:first-child { |
| 208 | margin-top: 0; |
| 209 | } |
| 210 | |
| 211 | ul, ol { |
| 212 | list-style-position: outside; |
| 213 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 214 | div.olist2 ol { |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 215 | list-style-type: lower-alpha; |
| 216 | } |
| 217 | |
| 218 | div.tableblock > table { |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 219 | border: 3px solid #527bbd; |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 220 | } |
| 221 | thead { |
| 222 | font-family: sans-serif; |
| 223 | font-weight: bold; |
| 224 | } |
| 225 | tfoot { |
| 226 | font-weight: bold; |
| 227 | } |
| 228 | |
| 229 | div.hlist { |
| 230 | margin-top: 0.8em; |
| 231 | margin-bottom: 0.8em; |
| 232 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 233 | div.hlist td { |
| 234 | padding-bottom: 5px; |
| 235 | } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 236 | td.hlist1 { |
| 237 | vertical-align: top; |
| 238 | font-style: italic; |
| 239 | padding-right: 0.8em; |
| 240 | } |
| 241 | td.hlist2 { |
| 242 | vertical-align: top; |
| 243 | } |
| 244 | |
| 245 | @media print { |
| 246 | div#footer-badges { display: none; } |
| 247 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 248 | |
| 249 | div#toctitle { |
| 250 | color: #527bbd; |
| 251 | font-family: sans-serif; |
| 252 | font-size: 1.1em; |
| 253 | font-weight: bold; |
| 254 | margin-top: 1.0em; |
| 255 | margin-bottom: 0.1em; |
| 256 | } |
| 257 | |
| 258 | div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { |
| 259 | margin-top: 0; |
| 260 | margin-bottom: 0; |
| 261 | } |
| 262 | div.toclevel2 { |
| 263 | margin-left: 2em; |
| 264 | font-size: 0.9em; |
| 265 | } |
| 266 | div.toclevel3 { |
| 267 | margin-left: 4em; |
| 268 | font-size: 0.9em; |
| 269 | } |
| 270 | div.toclevel4 { |
| 271 | margin-left: 6em; |
| 272 | font-size: 0.9em; |
| 273 | } |
| 274 | include1::./stylesheets/xhtml11-manpage.css[] |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 275 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 276 | |
| 277 | div.sidebar-content { |
| 278 | background: #ffffee; |
| 279 | border: 1px solid silver; |
| 280 | padding: 0.5em; |
| 281 | } |
| 282 | div.sidebar-title, div.image-title { |
| 283 | font-family: sans-serif; |
| 284 | font-weight: bold; |
| 285 | margin-top: 0.0em; |
| 286 | margin-bottom: 0.5em; |
| 287 | } |
| 288 | |
| 289 | div.listingblock div.content { |
| 290 | border: 1px solid silver; |
| 291 | background: #f4f4f4; |
| 292 | padding: 0.5em; |
| 293 | } |
| 294 | |
| 295 | div.quoteblock-content { |
| 296 | padding-left: 2.0em; |
| 297 | } |
| 298 | |
| 299 | div.exampleblock-content { |
| 300 | border-left: 2px solid silver; |
| 301 | padding-left: 0.5em; |
| 302 | } |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 303 | |
| 304 | /* IE6 sets dynamically generated links as visited. */ |
| 305 | div#toc a:visited { color: blue; } |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 306 | </style> |
| 307 | <title>git-svn(1)</title> |
| 308 | </head> |
| 309 | <body> |
| 310 | <div id="header"> |
| 311 | <h1> |
| 312 | git-svn(1) Manual Page |
| 313 | </h1> |
| 314 | <h2>NAME</h2> |
| 315 | <div class="sectionbody"> |
| 316 | <p>git-svn - |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 317 | Bidirectional operation between a Subversion repository and git |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 318 | </p> |
| 319 | </div> |
| 320 | </div> |
| 321 | <h2>SYNOPSIS</h2> |
| 322 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 323 | <div class="para"><p><em>git svn</em> <command> [options] [arguments]</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 324 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 325 | <h2 id="_description">DESCRIPTION</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 326 | <div class="sectionbody"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 327 | <div class="para"><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] | 328 | 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] | 329 | repository.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 330 | <div class="para"><p><em>git svn</em> can track a standard Subversion repository, |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 331 | following the common "trunk/branches/tags" layout, with the --stdlayout option. |
| 332 | It can also follow branches and tags in any layout with the -T/-t/-b options |
| 333 | (see options to <em>init</em> below, and also the <em>clone</em> command).</p></div> |
| 334 | <div class="para"><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] | 335 | repository can be updated from Subversion by the <em>fetch</em> command and |
| 336 | Subversion updated from git by the <em>dcommit</em> command.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 337 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 338 | <h2 id="_commands">COMMANDS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 339 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 340 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 341 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 342 | <em>init</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 343 | </dt> |
| 344 | <dd> |
| 345 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 346 | Initializes an empty git repository with additional |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 347 | metadata directories for <em>git svn</em>. The Subversion URL |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 348 | may be specified as a command-line argument, or as full |
| 349 | URL arguments to -T/-t/-b. Optionally, the target |
| 350 | directory to operate on can be specified as a second |
| 351 | argument. Normally this command initializes the current |
| 352 | directory. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 353 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 354 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 355 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 356 | -T<trunk_subdir> |
| 357 | </dt> |
| 358 | <dt> |
| 359 | --trunk=<trunk_subdir> |
| 360 | </dt> |
| 361 | <dt> |
| 362 | -t<tags_subdir> |
| 363 | </dt> |
| 364 | <dt> |
| 365 | --tags=<tags_subdir> |
| 366 | </dt> |
| 367 | <dt> |
| 368 | -b<branches_subdir> |
| 369 | </dt> |
| 370 | <dt> |
| 371 | --branches=<branches_subdir> |
| 372 | </dt> |
Junio C Hamano | 377018d | 2007-08-23 08:41:31 | [diff] [blame] | 373 | <dt> |
| 374 | -s |
| 375 | </dt> |
| 376 | <dt> |
| 377 | --stdlayout |
| 378 | </dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 379 | <dd> |
| 380 | <p> |
| 381 | These are optional command-line options for init. Each of |
| 382 | these flags can point to a relative repository path |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 383 | (--tags=project/tags) or a full url |
| 384 | (--tags=https://foo.org/project/tags). |
| 385 | You can specify more than one --tags and/or --branches options, in case |
| 386 | your Subversion repository places tags or branches under multiple paths. |
| 387 | The option --stdlayout is |
Junio C Hamano | 377018d | 2007-08-23 08:41:31 | [diff] [blame] | 388 | a shorthand way of setting trunk,tags,branches as the relative paths, |
| 389 | which is the Subversion default. If any of the other options are given |
| 390 | as well, they take precedence. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 391 | </p> |
| 392 | </dd> |
| 393 | <dt> |
| 394 | --no-metadata |
| 395 | </dt> |
| 396 | <dd> |
| 397 | <p> |
| 398 | Set the <em>noMetadata</em> option in the [svn-remote] config. |
| 399 | </p> |
| 400 | </dd> |
| 401 | <dt> |
| 402 | --use-svm-props |
| 403 | </dt> |
| 404 | <dd> |
| 405 | <p> |
| 406 | Set the <em>useSvmProps</em> option in the [svn-remote] config. |
| 407 | </p> |
| 408 | </dd> |
| 409 | <dt> |
| 410 | --use-svnsync-props |
| 411 | </dt> |
| 412 | <dd> |
| 413 | <p> |
| 414 | Set the <em>useSvnsyncProps</em> option in the [svn-remote] config. |
| 415 | </p> |
| 416 | </dd> |
| 417 | <dt> |
| 418 | --rewrite-root=<URL> |
| 419 | </dt> |
| 420 | <dd> |
| 421 | <p> |
| 422 | Set the <em>rewriteRoot</em> option in the [svn-remote] config. |
| 423 | </p> |
| 424 | </dd> |
| 425 | <dt> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 426 | --rewrite-uuid=<UUID> |
| 427 | </dt> |
| 428 | <dd> |
| 429 | <p> |
| 430 | Set the <em>rewriteUUID</em> option in the [svn-remote] config. |
| 431 | </p> |
| 432 | </dd> |
| 433 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 434 | --username=<USER> |
| 435 | </dt> |
| 436 | <dd> |
| 437 | <p> |
| 438 | For transports that SVN handles authentication for (http, |
| 439 | https, and plain svn), specify the username. For other |
| 440 | transports (eg svn+ssh://), you must include the username in |
| 441 | the URL, eg svn+ssh://foo@svn.bar.com/project |
| 442 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 443 | </dd> |
| 444 | <dt> |
| 445 | --prefix=<prefix> |
| 446 | </dt> |
| 447 | <dd> |
| 448 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 449 | This allows one to specify a prefix which is prepended |
| 450 | to the names of remotes if trunk/branches/tags are |
| 451 | specified. The prefix does not automatically include a |
| 452 | trailing slash, so be sure you include one in the |
Junio C Hamano | 0a2ad89 | 2007-06-24 22:23:12 | [diff] [blame] | 453 | argument if that is what you want. If --branches/-b is |
| 454 | specified, the prefix must include a trailing slash. |
| 455 | Setting a prefix is useful if you wish to track multiple |
| 456 | projects that share a common repository. |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 457 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 458 | </dd> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 459 | <dt> |
| 460 | --ignore-paths=<regex> |
| 461 | </dt> |
| 462 | <dd> |
| 463 | <p> |
| 464 | When passed to <em>init</em> or <em>clone</em> this regular expression will |
| 465 | be preserved as a config key. See <em>fetch</em> for a description |
| 466 | of <em>--ignore-paths</em>. |
| 467 | </p> |
| 468 | </dd> |
Junio C Hamano | aa2cd76 | 2009-07-26 08:14:01 | [diff] [blame] | 469 | <dt> |
| 470 | --no-minimize-url |
| 471 | </dt> |
| 472 | <dd> |
| 473 | <p> |
| 474 | When tracking multiple directories (using --stdlayout, |
| 475 | --branches, or --tags options), git svn will attempt to connect |
| 476 | to the root (or highest allowed level) of the Subversion |
| 477 | repository. This default allows better tracking of history if |
| 478 | entire projects are moved within a repository, but may cause |
| 479 | issues on repositories where read access restrictions are in |
| 480 | place. Passing <em>--no-minimize-url</em> will allow git svn to |
| 481 | accept URLs as-is without attempting to connect to a higher |
| 482 | level directory. This option is off by default when only |
| 483 | one URL/branch is tracked (it would do little good). |
| 484 | </p> |
| 485 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 486 | </dl></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 487 | </dd> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 488 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 489 | <em>fetch</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 490 | </dt> |
| 491 | <dd> |
| 492 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 493 | Fetch unfetched revisions from the Subversion remote we are |
| 494 | tracking. The name of the [svn-remote "…"] section in the |
| 495 | .git/config file may be specified as an optional command-line |
| 496 | argument. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 497 | </p> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 498 | <div class="vlist"><dl> |
| 499 | <dt> |
| 500 | --localtime |
| 501 | </dt> |
| 502 | <dd> |
| 503 | <p> |
| 504 | Store Git commit times in the local timezone instead of UTC. This |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 505 | 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] | 506 | that <tt>svn log</tt> would in the local timezone. |
| 507 | </p> |
Junio C Hamano | 0df868a | 2009-08-19 07:28:28 | [diff] [blame] | 508 | <div class="para"><p>This doesn't interfere with interoperating with the Subversion |
| 509 | repository you cloned from, but if you wish for your local Git |
| 510 | repository to be able to interoperate with someone else's local Git |
| 511 | repository, either don't use this option or you should both use it in |
| 512 | the same local timezone.</p></div> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 513 | </dd> |
| 514 | <dt> |
| 515 | --parent |
| 516 | </dt> |
| 517 | <dd> |
| 518 | <p> |
| 519 | Fetch only from the SVN parent of the current HEAD. |
| 520 | </p> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 521 | </dd> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 522 | <dt> |
| 523 | --ignore-paths=<regex> |
| 524 | </dt> |
| 525 | <dd> |
| 526 | <p> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 527 | This allows one to specify a Perl regular expression that will |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 528 | cause skipping of all matching paths from checkout from SVN. |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 529 | The <em>--ignore-paths</em> option should match for every <em>fetch</em> |
| 530 | (including automatic fetches due to <em>clone</em>, <em>dcommit</em>, |
| 531 | <em>rebase</em>, etc) on a given repository. |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 532 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 533 | <div class="verseblock"> |
| 534 | <div class="content">config key: svn-remote.<name>.ignore-paths</div></div> |
| 535 | <div class="para"><p>If the ignore-paths config key is set and the command line option is |
| 536 | also given, both regular expressions will be used.</p></div> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 537 | <div class="para"><p>Examples:</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 538 | <div class="vlist"><dl> |
| 539 | <dt> |
| 540 | Skip "doc*" directory for every fetch |
| 541 | </dt> |
| 542 | <dd> |
| 543 | <p> |
| 544 | + |
| 545 | </p> |
| 546 | <div class="listingblock"> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 547 | <div class="content"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 548 | <pre><tt>--ignore-paths="^doc"</tt></pre> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 549 | </div></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 550 | </dd> |
| 551 | <dt> |
| 552 | Skip "branches" and "tags" of first level directories |
| 553 | </dt> |
| 554 | <dd> |
| 555 | <p> |
| 556 | + |
| 557 | </p> |
| 558 | <div class="listingblock"> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 559 | <div class="content"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 560 | <pre><tt>--ignore-paths="^[^/]+/(?:branches|tags)"</tt></pre> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 561 | </div></div> |
| 562 | </dd> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 563 | </dl></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 564 | </dd> |
| 565 | <dt> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 566 | --use-log-author |
| 567 | </dt> |
| 568 | <dd> |
| 569 | <p> |
| 570 | When retrieving svn commits into git (as part of fetch, rebase, or |
| 571 | dcommit operations), look for the first From: or Signed-off-by: line |
| 572 | in the log message and use that as the author string. |
| 573 | </p> |
| 574 | </dd> |
| 575 | <dt> |
| 576 | --add-author-from |
| 577 | </dt> |
| 578 | <dd> |
| 579 | <p> |
| 580 | When committing to svn from git (as part of commit or dcommit |
| 581 | operations), if the existing log message doesn't already have a |
| 582 | From: or Signed-off-by: line, append a From: line based on the |
| 583 | git commit's author string. If you use this, then --use-log-author |
| 584 | will retrieve a valid author string for all commits. |
| 585 | </p> |
| 586 | </dd> |
| 587 | </dl></div> |
| 588 | </dd> |
| 589 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 590 | <em>clone</em> |
| 591 | </dt> |
| 592 | <dd> |
| 593 | <p> |
| 594 | Runs <em>init</em> and <em>fetch</em>. It will automatically create a |
| 595 | directory based on the basename of the URL passed to it; |
| 596 | or if a second argument is passed; it will create a directory |
| 597 | and work within that. It accepts all arguments that the |
| 598 | <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] | 599 | <em>--fetch-all</em> and <em>--parent</em>. After a repository is cloned, |
| 600 | the <em>fetch</em> command will be able to update revisions without |
| 601 | affecting the working tree; and the <em>rebase</em> command will be |
| 602 | able to update the working tree with the latest changes. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 603 | </p> |
| 604 | </dd> |
| 605 | <dt> |
| 606 | <em>rebase</em> |
| 607 | </dt> |
| 608 | <dd> |
| 609 | <p> |
| 610 | This fetches revisions from the SVN parent of the current HEAD |
| 611 | and rebases the current (uncommitted to SVN) work against it. |
| 612 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 613 | <div class="para"><p>This works similarly to <tt>svn update</tt> or <em>git pull</em> except that |
| 614 | it preserves linear history with <em>git rebase</em> instead of |
| 615 | <em>git merge</em> for ease of dcommitting with <em>git svn</em>.</p></div> |
| 616 | <div class="para"><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] | 617 | accept. However, <em>--fetch-all</em> only fetches from the current |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 618 | [svn-remote], and not all [svn-remote] definitions.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 619 | <div class="para"><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] | 620 | and have no uncommitted changes.</p></div> |
| 621 | <div class="vlist"><dl> |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 622 | <dt> |
| 623 | -l |
| 624 | </dt> |
| 625 | <dt> |
| 626 | --local |
| 627 | </dt> |
| 628 | <dd> |
| 629 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 630 | Do not fetch remotely; only run <em>git rebase</em> against the |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 631 | last fetched commit from the upstream SVN. |
| 632 | </p> |
| 633 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 634 | </dl></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 635 | </dd> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 636 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 637 | <em>dcommit</em> |
| 638 | </dt> |
| 639 | <dd> |
| 640 | <p> |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 641 | Commit each diff from a specified head directly to the SVN |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 642 | repository, and then rebase or reset (depending on whether or |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 643 | not there is a diff between SVN and head). This will create |
| 644 | a revision in SVN for each commit in git. |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 645 | It is recommended that you run <em>git svn</em> fetch and rebase (not |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 646 | pull or merge) your commits against the latest changes in the |
| 647 | SVN repository. |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 648 | An optional revision or branch argument may be specified, and |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 649 | causes <em>git svn</em> to do all work on that revision/branch |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 650 | instead of HEAD. |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 651 | This is advantageous over <em>set-tree</em> (below) because it produces |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 652 | cleaner, more linear history. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 653 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 654 | <div class="vlist"><dl> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 655 | <dt> |
| 656 | --no-rebase |
| 657 | </dt> |
| 658 | <dd> |
| 659 | <p> |
| 660 | After committing, do not rebase or reset. |
| 661 | </p> |
| 662 | </dd> |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 663 | <dt> |
| 664 | --commit-url <URL> |
| 665 | </dt> |
| 666 | <dd> |
| 667 | <p> |
| 668 | Commit to this SVN URL (the full path). This is intended to |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 669 | allow existing <em>git svn</em> repositories created with one transport |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 670 | method (e.g. <tt>svn://</tt> or <tt>http://</tt> for anonymous read) to be |
| 671 | reused if a user is later given access to an alternate transport |
| 672 | method (e.g. <tt>svn+ssh://</tt> or <tt>https://</tt>) for commit. |
| 673 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 674 | <div class="verseblock"> |
| 675 | <div class="content">config key: svn-remote.<name>.commiturl |
| 676 | config key: svn.commiturl (overwrites all svn-remote.<name>.commiturl options)</div></div> |
| 677 | <div class="para"><p>Using this option for any other purpose (don't ask) is very strongly |
| 678 | discouraged.</p></div> |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 679 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 680 | </dl></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 681 | </dd> |
| 682 | <dt> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 683 | <em>branch</em> |
| 684 | </dt> |
| 685 | <dd> |
| 686 | <p> |
| 687 | Create a branch in the SVN repository. |
| 688 | </p> |
| 689 | <div class="vlist"><dl> |
| 690 | <dt> |
| 691 | -m |
| 692 | </dt> |
| 693 | <dt> |
| 694 | --message |
| 695 | </dt> |
| 696 | <dd> |
| 697 | <p> |
| 698 | Allows to specify the commit message. |
| 699 | </p> |
| 700 | </dd> |
| 701 | <dt> |
| 702 | -t |
| 703 | </dt> |
| 704 | <dt> |
| 705 | --tag |
| 706 | </dt> |
| 707 | <dd> |
| 708 | <p> |
| 709 | Create a tag by using the tags_subdir instead of the branches_subdir |
| 710 | specified during git svn init. |
| 711 | </p> |
| 712 | </dd> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 713 | <dt> |
| 714 | -d |
| 715 | </dt> |
| 716 | <dt> |
| 717 | --destination |
| 718 | </dt> |
| 719 | <dd> |
| 720 | <p> |
| 721 | If more than one --branches (or --tags) option was given to the <em>init</em> |
| 722 | or <em>clone</em> command, you must provide the location of the branch (or |
| 723 | tag) you wish to create in the SVN repository. The value of this |
| 724 | option must match one of the paths specified by a --branches (or |
| 725 | --tags) option. You can see these paths with the commands |
| 726 | </p> |
| 727 | <div class="literalblock"> |
| 728 | <div class="content"> |
| 729 | <pre><tt>git config --get-all svn-remote.<name>.branches |
| 730 | git config --get-all svn-remote.<name>.tags</tt></pre> |
| 731 | </div></div> |
| 732 | <div class="para"><p>where <name> is the name of the SVN repository as specified by the -R option to |
| 733 | <em>init</em> (or "svn" by default).</p></div> |
| 734 | </dd> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 735 | <dt> |
| 736 | --username |
| 737 | </dt> |
| 738 | <dd> |
| 739 | <p> |
| 740 | Specify the SVN username to perform the commit as. This option overrides |
| 741 | configuration property <em>username</em>. |
| 742 | </p> |
| 743 | </dd> |
| 744 | <dt> |
| 745 | --commit-url |
| 746 | </dt> |
| 747 | <dd> |
| 748 | <p> |
| 749 | Use the specified URL to connect to the destination Subversion |
| 750 | repository. This is useful in cases where the source SVN |
| 751 | repository is read-only. This option overrides configuration |
| 752 | property <em>commiturl</em>. |
| 753 | </p> |
| 754 | <div class="literalblock"> |
| 755 | <div class="content"> |
| 756 | <pre><tt>git config --get-all svn-remote.<name>.commiturl</tt></pre> |
| 757 | </div></div> |
| 758 | </dd> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 759 | </dl></div> |
| 760 | </dd> |
| 761 | <dt> |
| 762 | <em>tag</em> |
| 763 | </dt> |
| 764 | <dd> |
| 765 | <p> |
| 766 | Create a tag in the SVN repository. This is a shorthand for |
| 767 | <em>branch -t</em>. |
| 768 | </p> |
| 769 | </dd> |
| 770 | <dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 771 | <em>log</em> |
| 772 | </dt> |
| 773 | <dd> |
| 774 | <p> |
| 775 | This should make it easy to look up svn log messages when svn |
| 776 | users refer to -r/--revision numbers. |
| 777 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 778 | <div class="para"><p>The following features from `svn log' are supported:</p></div> |
| 779 | <div class="vlist"><dl> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 780 | <dt> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 781 | -r <n>[:<n>] |
| 782 | </dt> |
| 783 | <dt> |
| 784 | --revision=<n>[:<n>] |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 785 | </dt> |
| 786 | <dd> |
| 787 | <p> |
| 788 | is supported, non-numeric args are not: |
| 789 | HEAD, NEXT, BASE, PREV, etc … |
| 790 | </p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 791 | </dd> |
| 792 | <dt> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 793 | -v |
| 794 | </dt> |
| 795 | <dt> |
| 796 | --verbose |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 797 | </dt> |
| 798 | <dd> |
| 799 | <p> |
| 800 | it's not completely compatible with the --verbose |
| 801 | output in svn log, but reasonably close. |
| 802 | </p> |
| 803 | </dd> |
| 804 | <dt> |
| 805 | --limit=<n> |
| 806 | </dt> |
| 807 | <dd> |
| 808 | <p> |
| 809 | is NOT the same as --max-count, doesn't count |
| 810 | merged/excluded commits |
| 811 | </p> |
| 812 | </dd> |
| 813 | <dt> |
| 814 | --incremental |
| 815 | </dt> |
| 816 | <dd> |
| 817 | <p> |
| 818 | supported |
| 819 | </p> |
| 820 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 821 | </dl></div> |
| 822 | <div class="para"><p>New features:</p></div> |
| 823 | <div class="vlist"><dl> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 824 | <dt> |
| 825 | --show-commit |
| 826 | </dt> |
| 827 | <dd> |
| 828 | <p> |
| 829 | shows the git commit sha1, as well |
| 830 | </p> |
| 831 | </dd> |
| 832 | <dt> |
| 833 | --oneline |
| 834 | </dt> |
| 835 | <dd> |
| 836 | <p> |
| 837 | our version of --pretty=oneline |
| 838 | </p> |
| 839 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 840 | </dl></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 841 | <div class="admonitionblock"> |
| 842 | <table><tr> |
| 843 | <td class="icon"> |
| 844 | <div class="title">Note</div> |
| 845 | </td> |
| 846 | <td class="content">SVN itself only stores times in UTC and nothing else. The regular svn |
| 847 | client converts the UTC time to the local time (or based on the TZ= |
| 848 | environment). This command has the same behaviour.</td> |
| 849 | </tr></table> |
| 850 | </div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 851 | <div class="para"><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] | 852 | </dd> |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 853 | <dt> |
| 854 | <em>blame</em> |
| 855 | </dt> |
| 856 | <dd> |
| 857 | <p> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 858 | Show what revision and author last modified each line of a file. The |
| 859 | output of this mode is format-compatible with the output of |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 860 | `svn blame' by default. Like the SVN blame command, |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 861 | local uncommitted changes in the working copy are ignored; |
| 862 | the version of the file in the HEAD revision is annotated. Unknown |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 863 | arguments are passed directly to <em>git blame</em>. |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 864 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 865 | <div class="vlist"><dl> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 866 | <dt> |
| 867 | --git-format |
| 868 | </dt> |
| 869 | <dd> |
| 870 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 871 | 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] | 872 | SVN revision numbers instead of git commit hashes. In this mode, |
| 873 | changes that haven't been committed to SVN (including local |
| 874 | working-copy edits) are shown as revision 0. |
| 875 | </p> |
| 876 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 877 | </dl></div> |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 878 | </dd> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 879 | <dt> |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 880 | <em>find-rev</em> |
| 881 | </dt> |
| 882 | <dd> |
| 883 | <p> |
| 884 | 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] | 885 | corresponding git commit hash (this can optionally be followed by a |
| 886 | tree-ish to specify which branch should be searched). When given a |
| 887 | tree-ish, returns the corresponding SVN revision number. |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 888 | </p> |
| 889 | </dd> |
| 890 | <dt> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 891 | <em>set-tree</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 892 | </dt> |
| 893 | <dd> |
| 894 | <p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 895 | You should consider using <em>dcommit</em> instead of this command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 896 | Commit specified commit or tree objects to SVN. This relies on |
| 897 | your imported fetch data being up-to-date. This makes |
| 898 | absolutely no attempts to do patching when committing to SVN, it |
| 899 | simply overwrites files with those specified in the tree or |
| 900 | commit. All merging is assumed to have taken place |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 901 | independently of <em>git svn</em> functions. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 902 | </p> |
| 903 | </dd> |
| 904 | <dt> |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 905 | <em>create-ignore</em> |
| 906 | </dt> |
| 907 | <dd> |
| 908 | <p> |
| 909 | Recursively finds the svn:ignore property on directories and |
| 910 | creates matching .gitignore files. The resulting files are staged to |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 911 | 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] | 912 | specific revision. |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 913 | </p> |
| 914 | </dd> |
| 915 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 916 | <em>show-ignore</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 917 | </dt> |
| 918 | <dd> |
| 919 | <p> |
| 920 | Recursively finds and lists the svn:ignore property on |
| 921 | directories. The output is suitable for appending to |
| 922 | the $GIT_DIR/info/exclude file. |
| 923 | </p> |
| 924 | </dd> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 925 | <dt> |
Junio C Hamano | a557446 | 2009-11-18 07:39:28 | [diff] [blame] | 926 | <em>mkdirs</em> |
| 927 | </dt> |
| 928 | <dd> |
| 929 | <p> |
| 930 | Attempts to recreate empty directories that core git cannot track |
| 931 | based on information in $GIT_DIR/svn/<refname>/unhandled.log files. |
| 932 | Empty directories are automatically recreated when using |
| 933 | "git svn clone" and "git svn rebase", so "mkdirs" is intended |
| 934 | for use after commands like "git checkout" or "git reset". |
| 935 | </p> |
| 936 | </dd> |
| 937 | <dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 938 | <em>commit-diff</em> |
| 939 | </dt> |
| 940 | <dd> |
| 941 | <p> |
| 942 | Commits the diff of two tree-ish arguments from the |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 943 | 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] | 944 | init</tt>-ed repository. This command takes three arguments, (a) the |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 945 | original tree to diff against, (b) the new tree result, (c) the |
| 946 | URL of the target Subversion repository. The final argument |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 947 | (URL) may be omitted if you are working from a <em>git svn</em>-aware |
| 948 | 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] | 949 | The -r<revision> option is required for this. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 950 | </p> |
| 951 | </dd> |
Junio C Hamano | a097054 | 2007-11-23 08:43:30 | [diff] [blame] | 952 | <dt> |
| 953 | <em>info</em> |
| 954 | </dt> |
| 955 | <dd> |
| 956 | <p> |
| 957 | Shows information about a file or directory similar to what |
| 958 | `svn info' provides. Does not currently support a -r/--revision |
| 959 | argument. Use the --url option to output only the value of the |
| 960 | <em>URL:</em> field. |
| 961 | </p> |
| 962 | </dd> |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 963 | <dt> |
| 964 | <em>proplist</em> |
| 965 | </dt> |
| 966 | <dd> |
| 967 | <p> |
| 968 | Lists the properties stored in the Subversion repository about a |
| 969 | given file or directory. Use -r/--revision to refer to a specific |
| 970 | Subversion revision. |
| 971 | </p> |
| 972 | </dd> |
| 973 | <dt> |
| 974 | <em>propget</em> |
| 975 | </dt> |
| 976 | <dd> |
| 977 | <p> |
| 978 | Gets the Subversion property given as the first argument, for a |
| 979 | file. A specific revision can be specified with -r/--revision. |
| 980 | </p> |
| 981 | </dd> |
| 982 | <dt> |
| 983 | <em>show-externals</em> |
| 984 | </dt> |
| 985 | <dd> |
| 986 | <p> |
| 987 | Shows the Subversion externals. Use -r/--revision to specify a |
| 988 | specific revision. |
| 989 | </p> |
| 990 | </dd> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 991 | <dt> |
Junio C Hamano | aa2cd76 | 2009-07-26 08:14:01 | [diff] [blame] | 992 | <em>gc</em> |
| 993 | </dt> |
| 994 | <dd> |
| 995 | <p> |
| 996 | Compress $GIT_DIR/svn/<refname>/unhandled.log files in .git/svn |
| 997 | and remove $GIT_DIR/svn/<refname>index files in .git/svn. |
| 998 | </p> |
| 999 | </dd> |
| 1000 | <dt> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1001 | <em>reset</em> |
| 1002 | </dt> |
| 1003 | <dd> |
| 1004 | <p> |
| 1005 | Undoes the effects of <em>fetch</em> back to the specified revision. |
| 1006 | This allows you to re-<em>fetch</em> an SVN revision. Normally the |
| 1007 | contents of an SVN revision should never change and <em>reset</em> |
| 1008 | should not be necessary. However, if SVN permissions change, |
| 1009 | or if you alter your --ignore-paths option, a <em>fetch</em> may fail |
| 1010 | with "not found in commit" (file not previously visible) or |
| 1011 | "checksum mismatch" (missed a modification). If the problem |
| 1012 | file cannot be ignored forever (with --ignore-paths) the only |
| 1013 | way to repair the repo is to use <em>reset</em>. |
| 1014 | </p> |
| 1015 | <div class="para"><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] | 1016 | 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] | 1017 | branches onto the new tree.</p></div> |
| 1018 | <div class="vlist"><dl> |
| 1019 | <dt> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1020 | -r <n> |
| 1021 | </dt> |
| 1022 | <dt> |
| 1023 | --revision=<n> |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1024 | </dt> |
| 1025 | <dd> |
| 1026 | <p> |
| 1027 | Specify the most recent revision to keep. All later revisions |
| 1028 | are discarded. |
| 1029 | </p> |
| 1030 | </dd> |
| 1031 | <dt> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1032 | -p |
| 1033 | </dt> |
| 1034 | <dt> |
| 1035 | --parent |
Junio C Hamano | 688eae0 | 2009-06-28 05:19:50 | [diff] [blame] | 1036 | </dt> |
| 1037 | <dd> |
| 1038 | <p> |
| 1039 | Discard the specified revision as well, keeping the nearest |
| 1040 | parent instead. |
| 1041 | </p> |
| 1042 | </dd> |
| 1043 | <dt> |
| 1044 | Example: |
| 1045 | </dt> |
| 1046 | <dd> |
| 1047 | <p> |
| 1048 | Assume you have local changes in "master", but you need to refetch "r2". |
| 1049 | </p> |
| 1050 | <div class="listingblock"> |
| 1051 | <div class="content"> |
| 1052 | <pre><tt> r1---r2---r3 remotes/git-svn |
| 1053 | \ |
| 1054 | A---B master</tt></pre> |
| 1055 | </div></div> |
| 1056 | <div class="para"><p>Fix the ignore-paths or SVN permissions problem that caused "r2" to |
| 1057 | be incomplete in the first place. Then:</p></div> |
| 1058 | <div class="verseblock"> |
| 1059 | <div class="content">git svn reset -r2 -p |
| 1060 | git svn fetch</div></div> |
| 1061 | <div class="listingblock"> |
| 1062 | <div class="content"> |
| 1063 | <pre><tt> r1---r2'--r3' remotes/git-svn |
| 1064 | \ |
| 1065 | r2---r3---A---B master</tt></pre> |
| 1066 | </div></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1067 | <div class="para"><p>Then fixup "master" with <em>git rebase</em>. |
| 1068 | 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] | 1069 | future <em>dcommit</em>!</p></div> |
| 1070 | <div class="verseblock"> |
| 1071 | <div class="content">git rebase --onto remotes/git-svn A^ master</div></div> |
| 1072 | <div class="listingblock"> |
| 1073 | <div class="content"> |
| 1074 | <pre><tt> r1---r2'--r3' remotes/git-svn |
| 1075 | \ |
| 1076 | A'--B' master</tt></pre> |
| 1077 | </div></div> |
| 1078 | </dd> |
| 1079 | </dl></div> |
| 1080 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1081 | </dl></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1082 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1083 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1084 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1085 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1086 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1087 | --shared[={false|true|umask|group|all|world|everybody}] |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1088 | </dt> |
| 1089 | <dt> |
| 1090 | --template=<template_directory> |
| 1091 | </dt> |
| 1092 | <dd> |
| 1093 | <p> |
| 1094 | Only used with the <em>init</em> command. |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1095 | These are passed directly to <em>git init</em>. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1096 | </p> |
| 1097 | </dd> |
| 1098 | <dt> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1099 | -r <ARG> |
| 1100 | </dt> |
| 1101 | <dt> |
| 1102 | --revision <ARG> |
| 1103 | </dt> |
| 1104 | <dd> |
| 1105 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1106 | Used with the <em>fetch</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1107 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1108 | <div class="para"><p>This allows revision ranges for partial/cauterized history |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1109 | to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges), |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1110 | $NUMBER:HEAD, and BASE:$NUMBER are all supported.</p></div> |
| 1111 | <div class="para"><p>This can allow you to make partial mirrors when running fetch; |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1112 | but is generally not recommended because history will be skipped |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1113 | and lost.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1114 | </dd> |
| 1115 | <dt> |
| 1116 | - |
| 1117 | </dt> |
| 1118 | <dt> |
| 1119 | --stdin |
| 1120 | </dt> |
| 1121 | <dd> |
| 1122 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1123 | Only used with the <em>set-tree</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1124 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1125 | <div class="para"><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] | 1126 | order. Only the leading sha1 is read from each line, so |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1127 | <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] | 1128 | </dd> |
| 1129 | <dt> |
| 1130 | --rmdir |
| 1131 | </dt> |
| 1132 | <dd> |
| 1133 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1134 | 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] | 1135 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1136 | <div class="para"><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] | 1137 | behind. SVN can version empty directories, and they are not |
| 1138 | removed by default if there are no files left in them. git |
| 1139 | cannot version empty directories. Enabling this flag will make |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1140 | the commit to SVN act like git.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1141 | <div class="verseblock"> |
| 1142 | <div class="content">config key: svn.rmdir</div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1143 | </dd> |
| 1144 | <dt> |
| 1145 | -e |
| 1146 | </dt> |
| 1147 | <dt> |
| 1148 | --edit |
| 1149 | </dt> |
| 1150 | <dd> |
| 1151 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1152 | 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] | 1153 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1154 | <div class="para"><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] | 1155 | default for objects that are commits, and forced on when committing |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1156 | tree objects.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1157 | <div class="verseblock"> |
| 1158 | <div class="content">config key: svn.edit</div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1159 | </dd> |
| 1160 | <dt> |
| 1161 | -l<num> |
| 1162 | </dt> |
| 1163 | <dt> |
| 1164 | --find-copies-harder |
| 1165 | </dt> |
| 1166 | <dd> |
| 1167 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1168 | 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] | 1169 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1170 | <div class="para"><p>They are both passed directly to <em>git diff-tree</em>; see |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1171 | <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] | 1172 | <div class="verseblock"> |
Junio C Hamano | 7ad22dc | 2007-01-29 02:55:48 | [diff] [blame] | 1173 | <div class="content">config key: svn.l |
| 1174 | config key: svn.findcopiesharder</div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1175 | </dd> |
| 1176 | <dt> |
| 1177 | -A<filename> |
| 1178 | </dt> |
| 1179 | <dt> |
| 1180 | --authors-file=<filename> |
| 1181 | </dt> |
| 1182 | <dd> |
| 1183 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1184 | Syntax is compatible with the file used by <em>git cvsimport</em>: |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1185 | </p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1186 | <div class="listingblock"> |
| 1187 | <div class="content"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1188 | <pre><tt> loginname = Joe User <user@example.com></tt></pre> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1189 | </div></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1190 | <div class="para"><p>If this option is specified and <em>git svn</em> encounters an SVN |
| 1191 | 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] | 1192 | will abort operation. The user will then have to add the |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1193 | appropriate entry. Re-running the previous <em>git svn</em> command |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1194 | after the authors-file is modified should continue operation.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1195 | <div class="verseblock"> |
| 1196 | <div class="content">config key: svn.authorsfile</div></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1197 | </dd> |
| 1198 | <dt> |
Junio C Hamano | 52d5def | 2009-05-21 16:27:43 | [diff] [blame] | 1199 | --authors-prog=<filename> |
| 1200 | </dt> |
| 1201 | <dd> |
| 1202 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1203 | If this option is specified, for each SVN committer name that |
| 1204 | does not exist in the authors file, the given file is executed |
| 1205 | with the committer name as the first argument. The program is |
| 1206 | expected to return a single line of the form "Name <email>", |
| 1207 | which will be treated as if included in the authors file. |
Junio C Hamano | 52d5def | 2009-05-21 16:27:43 | [diff] [blame] | 1208 | </p> |
| 1209 | </dd> |
| 1210 | <dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1211 | -q |
| 1212 | </dt> |
| 1213 | <dt> |
| 1214 | --quiet |
| 1215 | </dt> |
| 1216 | <dd> |
| 1217 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1218 | 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] | 1219 | even less verbose. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1220 | </p> |
| 1221 | </dd> |
| 1222 | <dt> |
| 1223 | --repack[=<n>] |
| 1224 | </dt> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1225 | <dt> |
| 1226 | --repack-flags=<flags> |
| 1227 | </dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1228 | <dd> |
| 1229 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1230 | These should help keep disk usage sane for large fetches with |
| 1231 | many revisions. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1232 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1233 | <div class="para"><p>--repack takes an optional argument for the number of revisions |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1234 | to fetch before repacking. This defaults to repacking every |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1235 | 1000 commits fetched if no argument is specified.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1236 | <div class="para"><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] | 1237 | <div class="verseblock"> |
| 1238 | <div class="content">config key: svn.repack |
| 1239 | config key: svn.repackflags</div></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1240 | </dd> |
| 1241 | <dt> |
| 1242 | -m |
| 1243 | </dt> |
| 1244 | <dt> |
| 1245 | --merge |
| 1246 | </dt> |
| 1247 | <dt> |
| 1248 | -s<strategy> |
| 1249 | </dt> |
| 1250 | <dt> |
| 1251 | --strategy=<strategy> |
| 1252 | </dt> |
| 1253 | <dd> |
| 1254 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1255 | 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] | 1256 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1257 | <div class="para"><p>Passed directly to <em>git rebase</em> when using <em>dcommit</em> if a |
| 1258 | <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] | 1259 | </dd> |
| 1260 | <dt> |
| 1261 | -n |
| 1262 | </dt> |
| 1263 | <dt> |
| 1264 | --dry-run |
| 1265 | </dt> |
| 1266 | <dd> |
| 1267 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1268 | This can be used with the <em>dcommit</em>, <em>rebase</em>, <em>branch</em> and |
| 1269 | <em>tag</em> commands. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1270 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1271 | <div class="para"><p>For <em>dcommit</em>, print out the series of git arguments that would show |
| 1272 | which diffs would be committed to SVN.</p></div> |
| 1273 | <div class="para"><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] | 1274 | repository associated with the current branch and the URL of svn |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1275 | repository that will be fetched from.</p></div> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1276 | <div class="para"><p>For <em>branch</em> and <em>tag</em>, display the urls that will be used for copying when |
| 1277 | creating the branch or tag.</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1278 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1279 | </dl></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1280 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1281 | <h2 id="_advanced_options">ADVANCED OPTIONS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1282 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1283 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1284 | <dt> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1285 | -i<GIT_SVN_ID> |
| 1286 | </dt> |
| 1287 | <dt> |
| 1288 | --id <GIT_SVN_ID> |
| 1289 | </dt> |
| 1290 | <dd> |
| 1291 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1292 | This sets GIT_SVN_ID (instead of using the environment). This |
| 1293 | allows the user to override the default refname to fetch from |
| 1294 | when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands |
| 1295 | no longer require this switch as an argument. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1296 | </p> |
| 1297 | </dd> |
| 1298 | <dt> |
| 1299 | -R<remote name> |
| 1300 | </dt> |
| 1301 | <dt> |
| 1302 | --svn-remote <remote name> |
| 1303 | </dt> |
| 1304 | <dd> |
| 1305 | <p> |
| 1306 | Specify the [svn-remote "<remote name>"] section to use, |
| 1307 | this allows SVN multiple repositories to be tracked. |
| 1308 | Default: "svn" |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1309 | </p> |
| 1310 | </dd> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1311 | <dt> |
| 1312 | --follow-parent |
| 1313 | </dt> |
| 1314 | <dd> |
| 1315 | <p> |
| 1316 | This is especially helpful when we're tracking a directory |
| 1317 | that has been moved around within the repository, or if we |
| 1318 | started tracking a branch and never tracked the trunk it was |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1319 | descended from. This feature is enabled by default, use |
| 1320 | --no-follow-parent to disable it. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1321 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1322 | <div class="verseblock"> |
| 1323 | <div class="content">config key: svn.followparent</div></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1324 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1325 | </dl></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1326 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1327 | <h2 id="_config_file_only_options">CONFIG FILE-ONLY OPTIONS</h2> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1328 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1329 | <div class="vlist"><dl> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1330 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1331 | svn.noMetadata |
| 1332 | </dt> |
| 1333 | <dt> |
| 1334 | svn-remote.<name>.noMetadata |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1335 | </dt> |
| 1336 | <dd> |
| 1337 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1338 | 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] | 1339 | </p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1340 | <div class="para"><p>If you lose your .git/svn/git-svn/.rev_db file, <em>git svn</em> will not |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1341 | be able to rebuild it and you won't be able to fetch again, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1342 | either. This is fine for one-shot imports.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1343 | <div class="para"><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] | 1344 | this, either. Using this conflicts with the <em>useSvmProps</em> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1345 | option for (hopefully) obvious reasons.</p></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1346 | </dd> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1347 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1348 | svn.useSvmProps |
| 1349 | </dt> |
| 1350 | <dt> |
| 1351 | svn-remote.<name>.useSvmProps |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1352 | </dt> |
| 1353 | <dd> |
| 1354 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1355 | This allows <em>git svn</em> to re-map repository URLs and UUIDs from |
| 1356 | mirrors created using SVN::Mirror (or svk) for metadata. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1357 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1358 | <div class="para"><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] | 1359 | that the revision was created by SVN::Mirror (also used by SVK). |
| 1360 | The property contains a repository UUID and a revision. We want |
| 1361 | to make it look like we are mirroring the original URL, so |
| 1362 | introduce a helper function that returns the original identity |
| 1363 | URL and UUID, and use it when generating metadata in commit |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1364 | messages.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1365 | </dd> |
| 1366 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1367 | svn.useSvnsyncProps |
| 1368 | </dt> |
| 1369 | <dt> |
| 1370 | svn-remote.<name>.useSvnsyncprops |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 1371 | </dt> |
| 1372 | <dd> |
| 1373 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1374 | Similar to the useSvmProps option; this is for users |
| 1375 | of the svnsync(1) command distributed with SVN 1.4.x and |
| 1376 | later. |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 1377 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1378 | </dd> |
| 1379 | <dt> |
| 1380 | svn-remote.<name>.rewriteRoot |
| 1381 | </dt> |
| 1382 | <dd> |
| 1383 | <p> |
| 1384 | This allows users to create repositories from alternate |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1385 | 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] | 1386 | server locally (accessing via file://) but wish to distribute |
| 1387 | the repository with a public http:// or svn:// URL in the |
| 1388 | metadata so users of it will see the public URL. |
| 1389 | </p> |
Junio C Hamano | 0538b89 | 2008-06-20 04:18:33 | [diff] [blame] | 1390 | </dd> |
Junio C Hamano | b325006 | 2009-02-11 20:16:50 | [diff] [blame] | 1391 | <dt> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1392 | svn-remote.<name>.rewriteUUID |
| 1393 | </dt> |
| 1394 | <dd> |
| 1395 | <p> |
| 1396 | Similar to the useSvmProps option; this is for users who need |
| 1397 | to remap the UUID manually. This may be useful in situations |
| 1398 | where the original UUID is not available via either useSvmProps |
| 1399 | or useSvnsyncProps. |
| 1400 | </p> |
| 1401 | </dd> |
| 1402 | <dt> |
Junio C Hamano | b325006 | 2009-02-11 20:16:50 | [diff] [blame] | 1403 | svn.brokenSymlinkWorkaround |
| 1404 | </dt> |
| 1405 | <dd> |
| 1406 | <p> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1407 | This disables potentially expensive checks to workaround |
| 1408 | broken symlinks checked into SVN by broken clients. Set this |
| 1409 | option to "false" if you track a SVN repository with many |
| 1410 | empty blobs that are not symlinks. This option may be changed |
| 1411 | while <em>git svn</em> is running and take effect on the next |
| 1412 | revision fetched. If unset, <em>git svn</em> assumes this option to |
| 1413 | be "true". |
Junio C Hamano | b325006 | 2009-02-11 20:16:50 | [diff] [blame] | 1414 | </p> |
| 1415 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1416 | </dl></div> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1417 | <div class="para"><p>Since the noMetadata, rewriteRoot, rewriteUUID, useSvnsyncProps and useSvmProps |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1418 | 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] | 1419 | <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] | 1420 | and these settings should never be changed once they are set.</p></div> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1421 | <div class="para"><p>Additionally, only one of these options can be used per svn-remote |
| 1422 | section because they affect the <em>git-svn-id:</em> metadata line, except |
| 1423 | for rewriteRoot and rewriteUUID which can be used together.</p></div> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1424 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1425 | <h2 id="_basic_examples">BASIC EXAMPLES</h2> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1426 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1427 | <div class="para"><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] | 1428 | <div class="listingblock"> |
| 1429 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1430 | <pre><tt># Clone a repo (like git clone): |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1431 | git svn clone http://svn.example.com/project/trunk |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1432 | # Enter the newly cloned directory: |
| 1433 | cd trunk |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1434 | # You should be on master branch, double-check with 'git branch' |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1435 | git branch |
| 1436 | # Do some work and commit locally to git: |
| 1437 | git commit ... |
| 1438 | # Something is committed to SVN, rebase your local changes against the |
| 1439 | # latest changes in SVN: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1440 | git svn rebase |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1441 | # Now commit your changes (that were committed previously using git) to SVN, |
| 1442 | # as well as automatically updating your working HEAD: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1443 | git svn dcommit |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1444 | # Append svn:ignore settings to the default git exclude file: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1445 | git svn show-ignore >> .git/info/exclude</tt></pre> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1446 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1447 | <div class="para"><p>Tracking and contributing to an entire Subversion-managed project |
| 1448 | (complete with a trunk, tags and branches):</p></div> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 1449 | <div class="listingblock"> |
| 1450 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1451 | <pre><tt># Clone a repo (like git clone): |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1452 | 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] | 1453 | # View all branches and tags you have cloned: |
| 1454 | git branch -r |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1455 | # Create a new branch in SVN |
| 1456 | git svn branch waldo |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1457 | # Reset your master to trunk (or any other branch, replacing 'trunk' |
| 1458 | # with the appropriate name): |
| 1459 | git reset --hard remotes/trunk |
| 1460 | # 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] | 1461 | # 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] | 1462 | </div></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1463 | <div class="para"><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] | 1464 | (especially for large Subversion repositories). If multiple |
| 1465 | people (or one person with multiple machines) want to use |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1466 | <em>git svn</em> to interact with the same Subversion repository, you can |
| 1467 | do the initial <em>git svn clone</em> to a repository on a server and |
| 1468 | 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] | 1469 | <div class="listingblock"> |
| 1470 | <div class="content"> |
| 1471 | <pre><tt># Do the initial import on a server |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1472 | ssh server "cd /pub && git svn clone http://svn.example.com/project |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1473 | # Clone locally - make sure the refs/remotes/ space matches the server |
| 1474 | mkdir project |
| 1475 | cd project |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1476 | git init |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1477 | git remote add origin server:/pub/project |
Junio C Hamano | 9e7b3f3 | 2008-06-29 08:49:03 | [diff] [blame] | 1478 | git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*' |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1479 | git fetch |
Junio C Hamano | d3452a0 | 2008-11-15 08:07:55 | [diff] [blame] | 1480 | # Create a local branch from one of the branches just fetched |
| 1481 | git checkout -b master FETCH_HEAD |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1482 | # 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] | 1483 | git svn init http://svn.example.com/project |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1484 | # Pull the latest changes from Subversion |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1485 | git svn rebase</tt></pre> |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1486 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1487 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1488 | <h2 id="_rebase_vs_pull_merge">REBASE VS. PULL/MERGE</h2> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1489 | <div class="sectionbody"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1490 | <div class="para"><p>Originally, <em>git svn</em> recommended that the <em>remotes/git-svn</em> branch be |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 1491 | pulled or merged from. This is because the author favored |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1492 | <tt>git svn set-tree B</tt> to commit a single head rather than the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1493 | <tt>git svn set-tree A..B</tt> notation to commit multiple commits.</p></div> |
| 1494 | <div class="para"><p>If you use <tt>git svn set-tree A..B</tt> to commit several diffs and you do |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 1495 | not have the latest remotes/git-svn merged into my-branch, you should |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1496 | use <tt>git svn rebase</tt> to update your work branch instead of <tt>git pull</tt> or |
Junio C Hamano | 0e88f3e | 2009-06-21 08:03:25 | [diff] [blame] | 1497 | <tt>git merge</tt>. <tt>pull</tt>/<tt>merge</tt> can cause non-linear history to be flattened |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 1498 | when committing into SVN, which can lead to merge commits reversing |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1499 | previous commits in SVN.</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1500 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1501 | <h2 id="_design_philosophy">DESIGN PHILOSOPHY</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1502 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1503 | <div class="para"><p>Merge tracking in Subversion is lacking and doing branched development |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1504 | with Subversion can be cumbersome as a result. While <em>git svn</em> can track |
Junio C Hamano | d2d9ae1 | 2007-09-19 02:27:57 | [diff] [blame] | 1505 | copy history (including branches and tags) for repositories adopting a |
| 1506 | standard layout, it cannot yet represent merge history that happened |
| 1507 | inside git back upstream to SVN users. Therefore it is advised that |
| 1508 | users keep history as linear as possible inside git to ease |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1509 | compatibility with SVN (see the CAVEATS section below).</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1510 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1511 | <h2 id="_caveats">CAVEATS</h2> |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1512 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1513 | <div class="para"><p>For the sake of simplicity and interoperating with a less-capable system |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1514 | (SVN), it is recommended that all <em>git svn</em> users clone, fetch and dcommit |
| 1515 | 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] | 1516 | operations between git repositories and branches. The recommended |
| 1517 | method of exchanging code between git branches and users is |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1518 | <em>git format-patch</em> and <em>git am</em>, or just 'dcommit'ing to the SVN repository.</p></div> |
| 1519 | <div class="para"><p>Running <em>git merge</em> or <em>git pull</em> is NOT recommended on a branch you |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1520 | plan to <em>dcommit</em> from. Subversion does not represent merges in any |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1521 | reasonable or useful fashion; so users using Subversion cannot see any |
| 1522 | 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] | 1523 | 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] | 1524 | branch.</p></div> |
Junio C Hamano | a557446 | 2009-11-18 07:39:28 | [diff] [blame] | 1525 | <div class="para"><p>If you do merge, note the following rule: <em>git svn dcommit</em> will |
| 1526 | attempt to commit on top of the SVN commit named in</p></div> |
| 1527 | <div class="listingblock"> |
| 1528 | <div class="content"> |
| 1529 | <pre><tt>git log --grep=^git-svn-id: --first-parent -1</tt></pre> |
| 1530 | </div></div> |
| 1531 | <div class="para"><p>You <em>must</em> therefore ensure that the most recent commit of the branch |
| 1532 | you want to dcommit to is the <em>first</em> parent of the merge. Chaos will |
| 1533 | ensue otherwise, especially if the first parent is an older commit on |
| 1534 | the same SVN branch.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1535 | <div class="para"><p><em>git clone</em> does not clone branches under the refs/remotes/ hierarchy or |
| 1536 | any <em>git svn</em> metadata, or config. So repositories created and managed with |
| 1537 | 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] | 1538 | at all.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1539 | <div class="para"><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] | 1540 | 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] | 1541 | on the remote repository. This is generally considered bad practice, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1542 | see the <a href="git-push.html">git-push(1)</a> documentation for details.</p></div> |
| 1543 | <div class="para"><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] | 1544 | already dcommitted. It is considered bad practice to --amend commits |
| 1545 | you've already pushed to a remote repository for other users, and |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1546 | dcommit with SVN is analogous to that.</p></div> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1547 | <div class="para"><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] | 1548 | handle name collisions (for example, if two branches from different paths have |
| 1549 | the same name, or if a branch and a tag have the same name). In these cases, |
| 1550 | use <em>init</em> to set up your git repository then, before your first <em>fetch</em>, edit |
| 1551 | the .git/config file so that the branches and tags are associated with |
| 1552 | different name spaces. For example:</p></div> |
| 1553 | <div class="literalblock"> |
| 1554 | <div class="content"> |
| 1555 | <pre><tt>branches = stable/*:refs/remotes/svn/stable/* |
| 1556 | branches = debug/*:refs/remotes/svn/debug/*</tt></pre> |
| 1557 | </div></div> |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1558 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1559 | <h2 id="_bugs">BUGS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1560 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1561 | <div class="para"><p>We ignore all SVN properties except svn:executable. Any unhandled |
| 1562 | properties are logged to $GIT_DIR/svn/<refname>/unhandled.log</p></div> |
| 1563 | <div class="para"><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] | 1564 | tracked when committing to SVN. I do not plan on adding support for |
| 1565 | this as it's quite difficult and time-consuming to get working for all |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1566 | the possible corner cases (git doesn't do it, either). Committing |
| 1567 | renamed and copied files are fully supported if they're similar enough |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1568 | for git to detect them.</p></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1569 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1570 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1571 | <div class="sectionbody"> |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1572 | <div class="para"><p><em>git svn</em> stores [svn-remote] configuration information in the |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1573 | repository .git/config file. It is similar the core git |
| 1574 | [remote] sections except <em>fetch</em> keys do not accept glob |
| 1575 | arguments; but they are instead handled by the <em>branches</em> |
| 1576 | and <em>tags</em> keys. Since some SVN repositories are oddly |
| 1577 | configured with multiple projects glob expansions such those |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1578 | listed below are allowed:</p></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1579 | <div class="listingblock"> |
| 1580 | <div class="content"> |
| 1581 | <pre><tt>[svn-remote "project-a"] |
| 1582 | url = http://server.org/svn |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1583 | fetch = trunk/project-a:refs/remotes/project-a/trunk |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1584 | branches = branches/*/project-a:refs/remotes/project-a/branches/* |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1585 | tags = tags/*/project-a:refs/remotes/project-a/tags/*</tt></pre> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1586 | </div></div> |
Junio C Hamano | 0773834 | 2009-04-23 03:06:56 | [diff] [blame] | 1587 | <div class="para"><p>Keep in mind that the <em>*</em> (asterisk) wildcard of the local ref |
| 1588 | (right of the <em>:</em>) *must* be the farthest right path component; |
| 1589 | 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] | 1590 | independent path component (surrounded by <em>/</em> or EOL). This |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1591 | type of configuration is not automatically created by <em>init</em> and |
Junio C Hamano | 48bc1ce | 2009-07-09 16:49:19 | [diff] [blame] | 1592 | should be manually entered with a text-editor or using <em>git config</em>.</p></div> |
Junio C Hamano | d0d892c | 2010-01-24 20:06:29 | [diff] [blame] | 1593 | <div class="para"><p>It is also possible to fetch a subset of branches or tags by using a |
| 1594 | comma-separated list of names within braces. For example:</p></div> |
| 1595 | <div class="listingblock"> |
| 1596 | <div class="content"> |
| 1597 | <pre><tt>[svn-remote "huge-project"] |
| 1598 | url = http://server.org/svn |
| 1599 | fetch = trunk/src:refs/remotes/trunk |
| 1600 | branches = branches/{red,green}/src:refs/remotes/branches/* |
| 1601 | tags = tags/{1.0,2.0}/src:refs/remotes/tags/*</tt></pre> |
| 1602 | </div></div> |
| 1603 | <div class="para"><p>Note that git-svn keeps track of the highest revision in which a branch |
| 1604 | or tag has appeared. If the subset of branches or tags is changed after |
| 1605 | fetching, then .git/svn/.metadata must be manually edited to remove (or |
| 1606 | reset) branches-maxRev and/or tags-maxRev as appropriate.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1607 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1608 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1609 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1610 | <div class="para"><p><a href="git-rebase.html">git-rebase(1)</a></p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1611 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1612 | <h2 id="_author">Author</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1613 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1614 | <div class="para"><p>Written by Eric Wong <normalperson@yhbt.net>.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1615 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1616 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1617 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1618 | <div class="para"><p>Written by Eric Wong <normalperson@yhbt.net>.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1619 | </div> |
| 1620 | <div id="footer"> |
| 1621 | <div id="footer-text"> |
Junio C Hamano | dca3482 | 2010-02-13 01:02:52 | [diff] [blame] | 1622 | Last updated 2010-02-13 00:59:58 UTC |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1623 | </div> |
| 1624 | </div> |
| 1625 | </body> |
| 1626 | </html> |