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 | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 317 | Bidirectional operation between a single Subversion branch 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 | ba4b928 | 2008-07-06 05:20:31 | [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 | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 330 | <div class="para"><p><em>git-svn</em> can track a single Subversion branch simply by using a |
| 331 | URL to the branch, follow branches laid out in the Subversion recommended |
| 332 | method (trunk, branches, tags directories) with the --stdlayout option, or |
| 333 | follow branches in any layout with the -T/-t/-b options (see options to |
| 334 | <em>init</em> below, and also the <em>clone</em> command).</p></div> |
| 335 | <div class="para"><p>Once tracking a Subversion branch (with any of the above methods), the git |
| 336 | repository can be updated from Subversion by the <em>fetch</em> command and |
| 337 | Subversion updated from git by the <em>dcommit</em> command.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 338 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 339 | <h2 id="_commands">COMMANDS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 340 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 341 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 342 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 343 | <em>init</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 344 | </dt> |
| 345 | <dd> |
| 346 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 347 | Initializes an empty git repository with additional |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 348 | metadata directories for <em>git-svn</em>. The Subversion URL |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 349 | may be specified as a command-line argument, or as full |
| 350 | URL arguments to -T/-t/-b. Optionally, the target |
| 351 | directory to operate on can be specified as a second |
| 352 | argument. Normally this command initializes the current |
| 353 | directory. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 354 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 355 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 356 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 357 | -T<trunk_subdir> |
| 358 | </dt> |
| 359 | <dt> |
| 360 | --trunk=<trunk_subdir> |
| 361 | </dt> |
| 362 | <dt> |
| 363 | -t<tags_subdir> |
| 364 | </dt> |
| 365 | <dt> |
| 366 | --tags=<tags_subdir> |
| 367 | </dt> |
| 368 | <dt> |
| 369 | -b<branches_subdir> |
| 370 | </dt> |
| 371 | <dt> |
| 372 | --branches=<branches_subdir> |
| 373 | </dt> |
Junio C Hamano | 377018d | 2007-08-23 08:41:31 | [diff] [blame] | 374 | <dt> |
| 375 | -s |
| 376 | </dt> |
| 377 | <dt> |
| 378 | --stdlayout |
| 379 | </dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 380 | <dd> |
| 381 | <p> |
| 382 | These are optional command-line options for init. Each of |
| 383 | these flags can point to a relative repository path |
| 384 | (--tags=project/tags') or a full url |
Junio C Hamano | 377018d | 2007-08-23 08:41:31 | [diff] [blame] | 385 | (--tags=https://foo.org/project/tags). The option --stdlayout is |
| 386 | a shorthand way of setting trunk,tags,branches as the relative paths, |
| 387 | which is the Subversion default. If any of the other options are given |
| 388 | as well, they take precedence. |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 389 | </p> |
| 390 | </dd> |
| 391 | <dt> |
| 392 | --no-metadata |
| 393 | </dt> |
| 394 | <dd> |
| 395 | <p> |
| 396 | Set the <em>noMetadata</em> option in the [svn-remote] config. |
| 397 | </p> |
| 398 | </dd> |
| 399 | <dt> |
| 400 | --use-svm-props |
| 401 | </dt> |
| 402 | <dd> |
| 403 | <p> |
| 404 | Set the <em>useSvmProps</em> option in the [svn-remote] config. |
| 405 | </p> |
| 406 | </dd> |
| 407 | <dt> |
| 408 | --use-svnsync-props |
| 409 | </dt> |
| 410 | <dd> |
| 411 | <p> |
| 412 | Set the <em>useSvnsyncProps</em> option in the [svn-remote] config. |
| 413 | </p> |
| 414 | </dd> |
| 415 | <dt> |
| 416 | --rewrite-root=<URL> |
| 417 | </dt> |
| 418 | <dd> |
| 419 | <p> |
| 420 | Set the <em>rewriteRoot</em> option in the [svn-remote] config. |
| 421 | </p> |
| 422 | </dd> |
| 423 | <dt> |
Junio C Hamano | dfccbb0 | 2008-05-26 01:16:14 | [diff] [blame] | 424 | --use-log-author |
| 425 | </dt> |
| 426 | <dd> |
| 427 | <p> |
| 428 | When retrieving svn commits into git (as part of fetch, rebase, or |
| 429 | dcommit operations), look for the first From: or Signed-off-by: line |
| 430 | in the log message and use that as the author string. |
| 431 | </p> |
| 432 | </dd> |
| 433 | <dt> |
| 434 | --add-author-from |
| 435 | </dt> |
| 436 | <dd> |
| 437 | <p> |
| 438 | When committing to svn from git (as part of commit or dcommit |
| 439 | operations), if the existing log message doesn't already have a |
| 440 | From: or Signed-off-by: line, append a From: line based on the |
| 441 | git commit's author string. If you use this, then --use-log-author |
| 442 | will retrieve a valid author string for all commits. |
| 443 | </p> |
| 444 | </dd> |
| 445 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 446 | --username=<USER> |
| 447 | </dt> |
| 448 | <dd> |
| 449 | <p> |
| 450 | For transports that SVN handles authentication for (http, |
| 451 | https, and plain svn), specify the username. For other |
| 452 | transports (eg svn+ssh://), you must include the username in |
| 453 | the URL, eg svn+ssh://foo@svn.bar.com/project |
| 454 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 455 | </dd> |
| 456 | <dt> |
| 457 | --prefix=<prefix> |
| 458 | </dt> |
| 459 | <dd> |
| 460 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 461 | This allows one to specify a prefix which is prepended |
| 462 | to the names of remotes if trunk/branches/tags are |
| 463 | specified. The prefix does not automatically include a |
| 464 | trailing slash, so be sure you include one in the |
Junio C Hamano | 0a2ad89 | 2007-06-24 22:23:12 | [diff] [blame] | 465 | argument if that is what you want. If --branches/-b is |
| 466 | specified, the prefix must include a trailing slash. |
| 467 | Setting a prefix is useful if you wish to track multiple |
| 468 | projects that share a common repository. |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 469 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 470 | </dd> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 471 | <dt> |
| 472 | --ignore-paths=<regex> |
| 473 | </dt> |
| 474 | <dd> |
| 475 | <p> |
| 476 | When passed to <em>init</em> or <em>clone</em> this regular expression will |
| 477 | be preserved as a config key. See <em>fetch</em> for a description |
| 478 | of <em>--ignore-paths</em>. |
| 479 | </p> |
| 480 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 481 | </dl></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 482 | </dd> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 483 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 484 | <em>fetch</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 485 | </dt> |
| 486 | <dd> |
| 487 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 488 | Fetch unfetched revisions from the Subversion remote we are |
| 489 | tracking. The name of the [svn-remote "…"] section in the |
| 490 | .git/config file may be specified as an optional command-line |
| 491 | argument. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 492 | </p> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 493 | <div class="vlist"><dl> |
| 494 | <dt> |
| 495 | --localtime |
| 496 | </dt> |
| 497 | <dd> |
| 498 | <p> |
| 499 | Store Git commit times in the local timezone instead of UTC. This |
| 500 | makes <em>git-log</em> (even without --date=local) show the same times |
| 501 | that <tt>svn log</tt> would in the local timezone. |
| 502 | </p> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 503 | </dd> |
| 504 | <dt> |
| 505 | --parent |
| 506 | </dt> |
| 507 | <dd> |
| 508 | <p> |
| 509 | Fetch only from the SVN parent of the current HEAD. |
| 510 | </p> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 511 | <div class="para"><p>This doesn't interfere with interoperating with the Subversion |
| 512 | repository you cloned from, but if you wish for your local Git |
| 513 | repository to be able to interoperate with someone else's local Git |
| 514 | repository, either don't use this option or you should both use it in |
| 515 | the same local timezone.</p></div> |
| 516 | </dd> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 517 | <dt> |
| 518 | --ignore-paths=<regex> |
| 519 | </dt> |
| 520 | <dd> |
| 521 | <p> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 522 | This allows one to specify a Perl regular expression that will |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 523 | cause skipping of all matching paths from checkout from SVN. |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 524 | The <em>--ignore-paths</em> option should match for every <em>fetch</em> |
| 525 | (including automatic fetches due to <em>clone</em>, <em>dcommit</em>, |
| 526 | <em>rebase</em>, etc) on a given repository. |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 527 | </p> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 528 | <div class="para"><p>config key: svn-remote.<name>.ignore-paths</p></div> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 529 | <div class="literalblock"> |
| 530 | <div class="content"> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 531 | <pre><tt>If the ignore-paths config key is set and the command |
| 532 | line option is also given, both regular expressions |
| 533 | will be used.</tt></pre> |
| 534 | </div></div> |
| 535 | <div class="para"><p>Examples:</p></div> |
| 536 | <div class="literalblock"> |
| 537 | <div class="content"> |
| 538 | <pre><tt>--ignore-paths="^doc" - skip "doc*" directory for every |
| 539 | fetch.</tt></pre> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 540 | </div></div> |
| 541 | <div class="literalblock"> |
| 542 | <div class="content"> |
Junio C Hamano | 5534441 | 2009-04-12 18:31:19 | [diff] [blame] | 543 | <pre><tt>--ignore-paths="^[^/]+/(?:branches|tags)" - skip |
| 544 | "branches" and "tags" of first level directories.</tt></pre> |
Junio C Hamano | a07e816 | 2009-01-26 17:36:43 | [diff] [blame] | 545 | </div></div> |
| 546 | </dd> |
Junio C Hamano | 8f4ac0d | 2009-01-19 08:35:36 | [diff] [blame] | 547 | </dl></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 548 | </dd> |
| 549 | <dt> |
| 550 | <em>clone</em> |
| 551 | </dt> |
| 552 | <dd> |
| 553 | <p> |
| 554 | Runs <em>init</em> and <em>fetch</em>. It will automatically create a |
| 555 | directory based on the basename of the URL passed to it; |
| 556 | or if a second argument is passed; it will create a directory |
| 557 | and work within that. It accepts all arguments that the |
| 558 | <em>init</em> and <em>fetch</em> commands accept; with the exception of |
| 559 | <em>--fetch-all</em>. After a repository is cloned, the <em>fetch</em> |
| 560 | command will be able to update revisions without affecting |
| 561 | the working tree; and the <em>rebase</em> command will be able |
| 562 | to update the working tree with the latest changes. |
| 563 | </p> |
| 564 | </dd> |
| 565 | <dt> |
| 566 | <em>rebase</em> |
| 567 | </dt> |
| 568 | <dd> |
| 569 | <p> |
| 570 | This fetches revisions from the SVN parent of the current HEAD |
| 571 | and rebases the current (uncommitted to SVN) work against it. |
| 572 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 573 | <div class="para"><p>This works similarly to <tt>svn update</tt> or <em>git-pull</em> except that |
| 574 | it preserves linear history with <em>git-rebase</em> instead of |
Junio C Hamano | 610d176 | 2008-11-28 06:27:13 | [diff] [blame] | 575 | <em>git-merge</em> for ease of dcommitting with <em>git-svn</em>.</p></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 576 | <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] | 577 | accept. However, <em>--fetch-all</em> only fetches from the current |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 578 | [svn-remote], and not all [svn-remote] definitions.</p></div> |
| 579 | <div class="para"><p>Like <em>git-rebase</em>; this requires that the working tree be clean |
| 580 | and have no uncommitted changes.</p></div> |
| 581 | <div class="vlist"><dl> |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 582 | <dt> |
| 583 | -l |
| 584 | </dt> |
| 585 | <dt> |
| 586 | --local |
| 587 | </dt> |
| 588 | <dd> |
| 589 | <p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 590 | Do not fetch remotely; only run <em>git-rebase</em> against the |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 591 | last fetched commit from the upstream SVN. |
| 592 | </p> |
| 593 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 594 | </dl></div> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 595 | </dd> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 596 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 597 | <em>dcommit</em> |
| 598 | </dt> |
| 599 | <dd> |
| 600 | <p> |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 601 | Commit each diff from a specified head directly to the SVN |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 602 | repository, and then rebase or reset (depending on whether or |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 603 | not there is a diff between SVN and head). This will create |
| 604 | a revision in SVN for each commit in git. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 605 | 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] | 606 | pull or merge) your commits against the latest changes in the |
| 607 | SVN repository. |
Junio C Hamano | 511162f | 2006-12-13 06:35:48 | [diff] [blame] | 608 | An optional command-line argument may be specified as an |
| 609 | alternative to HEAD. |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 610 | This is advantageous over <em>set-tree</em> (below) because it produces |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 611 | cleaner, more linear history.<br /> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 612 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 613 | <div class="vlist"><dl> |
Junio C Hamano | 67fad6d | 2007-05-06 08:53:12 | [diff] [blame] | 614 | <dt> |
| 615 | --no-rebase |
| 616 | </dt> |
| 617 | <dd> |
| 618 | <p> |
| 619 | After committing, do not rebase or reset. |
| 620 | </p> |
| 621 | </dd> |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 622 | <dt> |
| 623 | --commit-url <URL> |
| 624 | </dt> |
| 625 | <dd> |
| 626 | <p> |
| 627 | Commit to this SVN URL (the full path). This is intended to |
| 628 | allow existing git-svn repositories created with one transport |
| 629 | method (e.g. <tt>svn://</tt> or <tt>http://</tt> for anonymous read) to be |
| 630 | reused if a user is later given access to an alternate transport |
| 631 | method (e.g. <tt>svn+ssh://</tt> or <tt>https://</tt>) for commit. |
| 632 | </p> |
Junio C Hamano | a50c35c | 2009-02-24 07:37:05 | [diff] [blame] | 633 | <div class="para"><p>config key: svn-remote.<name>.commiturl</p></div> |
| 634 | <div class="para"><p>config key: svn.commiturl (overwrites all svn-remote.<name>.commiturl options)</p></div> |
Junio C Hamano | faa1e50 | 2008-08-10 03:55:58 | [diff] [blame] | 635 | <div class="literalblock"> |
| 636 | <div class="content"> |
| 637 | <pre><tt>Using this option for any other purpose (don't ask) |
| 638 | is very strongly discouraged.</tt></pre> |
| 639 | </div></div> |
| 640 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 641 | </dl></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 642 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 643 | </dl></div> |
| 644 | <div class="vlist"><dl> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 645 | <dt> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 646 | <em>branch</em> |
| 647 | </dt> |
| 648 | <dd> |
| 649 | <p> |
| 650 | Create a branch in the SVN repository. |
| 651 | </p> |
| 652 | <div class="vlist"><dl> |
| 653 | <dt> |
| 654 | -m |
| 655 | </dt> |
| 656 | <dt> |
| 657 | --message |
| 658 | </dt> |
| 659 | <dd> |
| 660 | <p> |
| 661 | Allows to specify the commit message. |
| 662 | </p> |
| 663 | </dd> |
| 664 | <dt> |
| 665 | -t |
| 666 | </dt> |
| 667 | <dt> |
| 668 | --tag |
| 669 | </dt> |
| 670 | <dd> |
| 671 | <p> |
| 672 | Create a tag by using the tags_subdir instead of the branches_subdir |
| 673 | specified during git svn init. |
| 674 | </p> |
| 675 | </dd> |
| 676 | </dl></div> |
| 677 | </dd> |
| 678 | <dt> |
| 679 | <em>tag</em> |
| 680 | </dt> |
| 681 | <dd> |
| 682 | <p> |
| 683 | Create a tag in the SVN repository. This is a shorthand for |
| 684 | <em>branch -t</em>. |
| 685 | </p> |
| 686 | </dd> |
| 687 | <dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 688 | <em>log</em> |
| 689 | </dt> |
| 690 | <dd> |
| 691 | <p> |
| 692 | This should make it easy to look up svn log messages when svn |
| 693 | users refer to -r/--revision numbers. |
| 694 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 695 | <div class="para"><p>The following features from `svn log' are supported:</p></div> |
| 696 | <div class="vlist"><dl> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 697 | <dt> |
| 698 | --revision=<n>[:<n>] |
| 699 | </dt> |
| 700 | <dd> |
| 701 | <p> |
| 702 | is supported, non-numeric args are not: |
| 703 | HEAD, NEXT, BASE, PREV, etc … |
| 704 | </p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 705 | </dd> |
| 706 | <dt> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 707 | -v/--verbose |
| 708 | </dt> |
| 709 | <dd> |
| 710 | <p> |
| 711 | it's not completely compatible with the --verbose |
| 712 | output in svn log, but reasonably close. |
| 713 | </p> |
| 714 | </dd> |
| 715 | <dt> |
| 716 | --limit=<n> |
| 717 | </dt> |
| 718 | <dd> |
| 719 | <p> |
| 720 | is NOT the same as --max-count, doesn't count |
| 721 | merged/excluded commits |
| 722 | </p> |
| 723 | </dd> |
| 724 | <dt> |
| 725 | --incremental |
| 726 | </dt> |
| 727 | <dd> |
| 728 | <p> |
| 729 | supported |
| 730 | </p> |
| 731 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 732 | </dl></div> |
| 733 | <div class="para"><p>New features:</p></div> |
| 734 | <div class="vlist"><dl> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 735 | <dt> |
| 736 | --show-commit |
| 737 | </dt> |
| 738 | <dd> |
| 739 | <p> |
| 740 | shows the git commit sha1, as well |
| 741 | </p> |
| 742 | </dd> |
| 743 | <dt> |
| 744 | --oneline |
| 745 | </dt> |
| 746 | <dd> |
| 747 | <p> |
| 748 | our version of --pretty=oneline |
| 749 | </p> |
| 750 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 751 | </dl></div> |
Junio C Hamano | 24bc09a | 2008-02-28 00:27:44 | [diff] [blame] | 752 | <div class="admonitionblock"> |
| 753 | <table><tr> |
| 754 | <td class="icon"> |
| 755 | <div class="title">Note</div> |
| 756 | </td> |
| 757 | <td class="content">SVN itself only stores times in UTC and nothing else. The regular svn |
| 758 | client converts the UTC time to the local time (or based on the TZ= |
| 759 | environment). This command has the same behaviour.</td> |
| 760 | </tr></table> |
| 761 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 762 | <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] | 763 | </dd> |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 764 | <dt> |
| 765 | <em>blame</em> |
| 766 | </dt> |
| 767 | <dd> |
| 768 | <p> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 769 | Show what revision and author last modified each line of a file. The |
| 770 | output of this mode is format-compatible with the output of |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 771 | `svn blame' by default. Like the SVN blame command, |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 772 | local uncommitted changes in the working copy are ignored; |
| 773 | the version of the file in the HEAD revision is annotated. Unknown |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 774 | arguments are passed directly to <em>git-blame</em>. |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 775 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 776 | <div class="vlist"><dl> |
Junio C Hamano | 869bb80 | 2008-05-12 00:29:47 | [diff] [blame] | 777 | <dt> |
| 778 | --git-format |
| 779 | </dt> |
| 780 | <dd> |
| 781 | <p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 782 | 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] | 783 | SVN revision numbers instead of git commit hashes. In this mode, |
| 784 | changes that haven't been committed to SVN (including local |
| 785 | working-copy edits) are shown as revision 0. |
| 786 | </p> |
| 787 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 788 | </dl></div> |
Junio C Hamano | 9c33415 | 2008-02-12 03:18:52 | [diff] [blame] | 789 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 790 | </dl></div> |
| 791 | <div class="vlist"><dl> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 792 | <dt> |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 793 | <em>find-rev</em> |
| 794 | </dt> |
| 795 | <dd> |
| 796 | <p> |
| 797 | 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] | 798 | corresponding git commit hash (this can optionally be followed by a |
| 799 | tree-ish to specify which branch should be searched). When given a |
| 800 | tree-ish, returns the corresponding SVN revision number. |
Junio C Hamano | 469d60e | 2007-04-29 18:30:34 | [diff] [blame] | 801 | </p> |
| 802 | </dd> |
| 803 | <dt> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 804 | <em>set-tree</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 805 | </dt> |
| 806 | <dd> |
| 807 | <p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 808 | You should consider using <em>dcommit</em> instead of this command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 809 | Commit specified commit or tree objects to SVN. This relies on |
| 810 | your imported fetch data being up-to-date. This makes |
| 811 | absolutely no attempts to do patching when committing to SVN, it |
| 812 | simply overwrites files with those specified in the tree or |
| 813 | commit. All merging is assumed to have taken place |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 814 | independently of <em>git-svn</em> functions. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 815 | </p> |
| 816 | </dd> |
| 817 | <dt> |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 818 | <em>create-ignore</em> |
| 819 | </dt> |
| 820 | <dd> |
| 821 | <p> |
| 822 | Recursively finds the svn:ignore property on directories and |
| 823 | creates matching .gitignore files. The resulting files are staged to |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 824 | 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] | 825 | specific revision. |
Junio C Hamano | 47d68a5 | 2008-05-06 06:35:40 | [diff] [blame] | 826 | </p> |
| 827 | </dd> |
| 828 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 829 | <em>show-ignore</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 830 | </dt> |
| 831 | <dd> |
| 832 | <p> |
| 833 | Recursively finds and lists the svn:ignore property on |
| 834 | directories. The output is suitable for appending to |
| 835 | the $GIT_DIR/info/exclude file. |
| 836 | </p> |
| 837 | </dd> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 838 | <dt> |
| 839 | <em>commit-diff</em> |
| 840 | </dt> |
| 841 | <dd> |
| 842 | <p> |
| 843 | Commits the diff of two tree-ish arguments from the |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 844 | 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] | 845 | init</tt>-ed repository. This command takes three arguments, (a) the |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 846 | original tree to diff against, (b) the new tree result, (c) the |
| 847 | URL of the target Subversion repository. The final argument |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 848 | (URL) may be omitted if you are working from a <em>git-svn</em>-aware |
| 849 | 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] | 850 | The -r<revision> option is required for this. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 851 | </p> |
| 852 | </dd> |
Junio C Hamano | a097054 | 2007-11-23 08:43:30 | [diff] [blame] | 853 | <dt> |
| 854 | <em>info</em> |
| 855 | </dt> |
| 856 | <dd> |
| 857 | <p> |
| 858 | Shows information about a file or directory similar to what |
| 859 | `svn info' provides. Does not currently support a -r/--revision |
| 860 | argument. Use the --url option to output only the value of the |
| 861 | <em>URL:</em> field. |
| 862 | </p> |
| 863 | </dd> |
Junio C Hamano | feeb1be | 2008-05-22 00:53:35 | [diff] [blame] | 864 | <dt> |
| 865 | <em>proplist</em> |
| 866 | </dt> |
| 867 | <dd> |
| 868 | <p> |
| 869 | Lists the properties stored in the Subversion repository about a |
| 870 | given file or directory. Use -r/--revision to refer to a specific |
| 871 | Subversion revision. |
| 872 | </p> |
| 873 | </dd> |
| 874 | <dt> |
| 875 | <em>propget</em> |
| 876 | </dt> |
| 877 | <dd> |
| 878 | <p> |
| 879 | Gets the Subversion property given as the first argument, for a |
| 880 | file. A specific revision can be specified with -r/--revision. |
| 881 | </p> |
| 882 | </dd> |
| 883 | <dt> |
| 884 | <em>show-externals</em> |
| 885 | </dt> |
| 886 | <dd> |
| 887 | <p> |
| 888 | Shows the Subversion externals. Use -r/--revision to specify a |
| 889 | specific revision. |
| 890 | </p> |
| 891 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 892 | </dl></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 893 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 894 | <h2 id="_options">OPTIONS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 895 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 896 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 897 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 898 | --shared[={false|true|umask|group|all|world|everybody}] |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 899 | </dt> |
| 900 | <dt> |
| 901 | --template=<template_directory> |
| 902 | </dt> |
| 903 | <dd> |
| 904 | <p> |
| 905 | Only used with the <em>init</em> command. |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 906 | These are passed directly to <em>git-init</em>. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 907 | </p> |
| 908 | </dd> |
| 909 | <dt> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 910 | -r <ARG> |
| 911 | </dt> |
| 912 | <dt> |
| 913 | --revision <ARG> |
| 914 | </dt> |
| 915 | <dd> |
| 916 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 917 | Used with the <em>fetch</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 918 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 919 | <div class="para"><p>This allows revision ranges for partial/cauterized history |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 920 | to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges), |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 921 | $NUMBER:HEAD, and BASE:$NUMBER are all supported.</p></div> |
| 922 | <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] | 923 | but is generally not recommended because history will be skipped |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 924 | and lost.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 925 | </dd> |
| 926 | <dt> |
| 927 | - |
| 928 | </dt> |
| 929 | <dt> |
| 930 | --stdin |
| 931 | </dt> |
| 932 | <dd> |
| 933 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 934 | Only used with the <em>set-tree</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 935 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 936 | <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] | 937 | order. Only the leading sha1 is read from each line, so |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 938 | <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] | 939 | </dd> |
| 940 | <dt> |
| 941 | --rmdir |
| 942 | </dt> |
| 943 | <dd> |
| 944 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 945 | 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] | 946 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 947 | <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] | 948 | behind. SVN can version empty directories, and they are not |
| 949 | removed by default if there are no files left in them. git |
| 950 | cannot version empty directories. Enabling this flag will make |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 951 | the commit to SVN act like git.</p></div> |
| 952 | <div class="para"><p>config key: svn.rmdir</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 953 | </dd> |
| 954 | <dt> |
| 955 | -e |
| 956 | </dt> |
| 957 | <dt> |
| 958 | --edit |
| 959 | </dt> |
| 960 | <dd> |
| 961 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 962 | 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] | 963 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 964 | <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] | 965 | default for objects that are commits, and forced on when committing |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 966 | tree objects.</p></div> |
| 967 | <div class="para"><p>config key: svn.edit</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 968 | </dd> |
| 969 | <dt> |
| 970 | -l<num> |
| 971 | </dt> |
| 972 | <dt> |
| 973 | --find-copies-harder |
| 974 | </dt> |
| 975 | <dd> |
| 976 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 977 | 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] | 978 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 979 | <div class="para"><p>They are both passed directly to <em>git-diff-tree</em>; see |
| 980 | <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] | 981 | <div class="verseblock"> |
Junio C Hamano | 7ad22dc | 2007-01-29 02:55:48 | [diff] [blame] | 982 | <div class="content">config key: svn.l |
| 983 | config key: svn.findcopiesharder</div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 984 | </dd> |
| 985 | <dt> |
| 986 | -A<filename> |
| 987 | </dt> |
| 988 | <dt> |
| 989 | --authors-file=<filename> |
| 990 | </dt> |
| 991 | <dd> |
| 992 | <p> |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 993 | Syntax is compatible with the file used by <em>git-cvsimport</em>: |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 994 | </p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 995 | <div class="listingblock"> |
| 996 | <div class="content"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 997 | <pre><tt> loginname = Joe User <user@example.com></tt></pre> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 998 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 999 | <div class="para"><p>If this option is specified and <em>git-svn</em> encounters an SVN |
| 1000 | 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] | 1001 | will abort operation. The user will then have to add the |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1002 | appropriate entry. Re-running the previous <em>git-svn</em> command |
| 1003 | after the authors-file is modified should continue operation.</p></div> |
| 1004 | <div class="para"><p>config key: svn.authorsfile</p></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1005 | </dd> |
| 1006 | <dt> |
Junio C Hamano | 52d5def | 2009-05-21 16:27:43 | [diff] [blame] | 1007 | --authors-prog=<filename> |
| 1008 | </dt> |
| 1009 | <dd> |
| 1010 | <p> |
| 1011 | If this option is specified, for each SVN committer name that does not |
| 1012 | exist in the authors file, the given file is executed with the committer |
| 1013 | name as the first argument. The program is expected to return a single |
| 1014 | line of the form "Name <email>", which will be treated as if included in |
| 1015 | the authors file. |
| 1016 | </p> |
| 1017 | </dd> |
| 1018 | <dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1019 | -q |
| 1020 | </dt> |
| 1021 | <dt> |
| 1022 | --quiet |
| 1023 | </dt> |
| 1024 | <dd> |
| 1025 | <p> |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1026 | Make <em>git-svn</em> less verbose. Specify a second time to make it |
| 1027 | even less verbose. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1028 | </p> |
| 1029 | </dd> |
| 1030 | <dt> |
| 1031 | --repack[=<n>] |
| 1032 | </dt> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1033 | <dt> |
| 1034 | --repack-flags=<flags> |
| 1035 | </dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1036 | <dd> |
| 1037 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1038 | These should help keep disk usage sane for large fetches |
| 1039 | with many revisions. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1040 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1041 | <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] | 1042 | to fetch before repacking. This defaults to repacking every |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1043 | 1000 commits fetched if no argument is specified.</p></div> |
| 1044 | <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] | 1045 | <div class="verseblock"> |
| 1046 | <div class="content">config key: svn.repack |
| 1047 | config key: svn.repackflags</div></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1048 | </dd> |
| 1049 | <dt> |
| 1050 | -m |
| 1051 | </dt> |
| 1052 | <dt> |
| 1053 | --merge |
| 1054 | </dt> |
| 1055 | <dt> |
| 1056 | -s<strategy> |
| 1057 | </dt> |
| 1058 | <dt> |
| 1059 | --strategy=<strategy> |
| 1060 | </dt> |
| 1061 | <dd> |
| 1062 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1063 | 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] | 1064 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1065 | <div class="para"><p>Passed directly to <em>git-rebase</em> when using <em>dcommit</em> if a |
| 1066 | <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] | 1067 | </dd> |
| 1068 | <dt> |
| 1069 | -n |
| 1070 | </dt> |
| 1071 | <dt> |
| 1072 | --dry-run |
| 1073 | </dt> |
| 1074 | <dd> |
| 1075 | <p> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1076 | This can be used with the <em>dcommit</em>, <em>rebase</em>, <em>branch</em> and <em>tag</em> |
| 1077 | commands. |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1078 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1079 | <div class="para"><p>For <em>dcommit</em>, print out the series of git arguments that would show |
| 1080 | which diffs would be committed to SVN.</p></div> |
| 1081 | <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] | 1082 | repository associated with the current branch and the URL of svn |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1083 | repository that will be fetched from.</p></div> |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1084 | <div class="para"><p>For <em>branch</em> and <em>tag</em>, display the urls that will be used for copying when |
| 1085 | creating the branch or tag.</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1086 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1087 | </dl></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1088 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1089 | <h2 id="_advanced_options">ADVANCED OPTIONS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1090 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1091 | <div class="vlist"><dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1092 | <dt> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1093 | -i<GIT_SVN_ID> |
| 1094 | </dt> |
| 1095 | <dt> |
| 1096 | --id <GIT_SVN_ID> |
| 1097 | </dt> |
| 1098 | <dd> |
| 1099 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1100 | This sets GIT_SVN_ID (instead of using the environment). This |
| 1101 | allows the user to override the default refname to fetch from |
| 1102 | when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands |
| 1103 | no longer require this switch as an argument. |
| 1104 | </p> |
| 1105 | </dd> |
| 1106 | <dt> |
| 1107 | -R<remote name> |
| 1108 | </dt> |
| 1109 | <dt> |
| 1110 | --svn-remote <remote name> |
| 1111 | </dt> |
| 1112 | <dd> |
| 1113 | <p> |
| 1114 | Specify the [svn-remote "<remote name>"] section to use, |
| 1115 | this allows SVN multiple repositories to be tracked. |
| 1116 | Default: "svn" |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1117 | </p> |
| 1118 | </dd> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1119 | <dt> |
| 1120 | --follow-parent |
| 1121 | </dt> |
| 1122 | <dd> |
| 1123 | <p> |
| 1124 | This is especially helpful when we're tracking a directory |
| 1125 | that has been moved around within the repository, or if we |
| 1126 | started tracking a branch and never tracked the trunk it was |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1127 | descended from. This feature is enabled by default, use |
| 1128 | --no-follow-parent to disable it. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1129 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1130 | <div class="para"><p>config key: svn.followparent</p></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1131 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1132 | </dl></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1133 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1134 | <h2 id="_config_file_only_options">CONFIG FILE-ONLY OPTIONS</h2> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1135 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1136 | <div class="vlist"><dl> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1137 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1138 | svn.noMetadata |
| 1139 | </dt> |
| 1140 | <dt> |
| 1141 | svn-remote.<name>.noMetadata |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1142 | </dt> |
| 1143 | <dd> |
| 1144 | <p> |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1145 | 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] | 1146 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1147 | <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] | 1148 | 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] | 1149 | either. This is fine for one-shot imports.</p></div> |
| 1150 | <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] | 1151 | this, either. Using this conflicts with the <em>useSvmProps</em> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1152 | option for (hopefully) obvious reasons.</p></div> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 1153 | </dd> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1154 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1155 | svn.useSvmProps |
| 1156 | </dt> |
| 1157 | <dt> |
| 1158 | svn-remote.<name>.useSvmProps |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1159 | </dt> |
| 1160 | <dd> |
| 1161 | <p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1162 | This allows <em>git-svn</em> to re-map repository URLs and UUIDs from |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1163 | mirrors created using SVN::Mirror (or svk) for metadata. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1164 | </p> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1165 | <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] | 1166 | that the revision was created by SVN::Mirror (also used by SVK). |
| 1167 | The property contains a repository UUID and a revision. We want |
| 1168 | to make it look like we are mirroring the original URL, so |
| 1169 | introduce a helper function that returns the original identity |
| 1170 | URL and UUID, and use it when generating metadata in commit |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1171 | messages.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1172 | </dd> |
| 1173 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1174 | svn.useSvnsyncProps |
| 1175 | </dt> |
| 1176 | <dt> |
| 1177 | svn-remote.<name>.useSvnsyncprops |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 1178 | </dt> |
| 1179 | <dd> |
| 1180 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1181 | Similar to the useSvmProps option; this is for users |
| 1182 | of the svnsync(1) command distributed with SVN 1.4.x and |
| 1183 | later. |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 1184 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1185 | </dd> |
| 1186 | <dt> |
| 1187 | svn-remote.<name>.rewriteRoot |
| 1188 | </dt> |
| 1189 | <dd> |
| 1190 | <p> |
| 1191 | This allows users to create repositories from alternate |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1192 | 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] | 1193 | server locally (accessing via file://) but wish to distribute |
| 1194 | the repository with a public http:// or svn:// URL in the |
| 1195 | metadata so users of it will see the public URL. |
| 1196 | </p> |
Junio C Hamano | 0538b89 | 2008-06-20 04:18:33 | [diff] [blame] | 1197 | </dd> |
Junio C Hamano | b325006 | 2009-02-11 20:16:50 | [diff] [blame] | 1198 | <dt> |
| 1199 | svn.brokenSymlinkWorkaround |
| 1200 | </dt> |
| 1201 | <dd> |
| 1202 | <p> |
| 1203 | This disables potentially expensive checks to workaround broken symlinks |
| 1204 | checked into SVN by broken clients. Set this option to "false" if you |
| 1205 | track a SVN repository with many empty blobs that are not symlinks. |
| 1206 | This option may be changed while "git-svn" is running and take effect on |
| 1207 | the next revision fetched. If unset, git-svn assumes this option to be |
| 1208 | "true". |
| 1209 | </p> |
| 1210 | </dd> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1211 | </dl></div> |
| 1212 | <div class="para"><p>Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps |
| 1213 | 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] | 1214 | <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] | 1215 | and these settings should never be changed once they are set.</p></div> |
| 1216 | <div class="para"><p>Additionally, only one of these four options can be used per-svn-remote |
| 1217 | section because they affect the <em>git-svn-id:</em> metadata line.</p></div> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1218 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1219 | <h2 id="_basic_examples">BASIC EXAMPLES</h2> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 1220 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1221 | <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] | 1222 | <div class="listingblock"> |
| 1223 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1224 | <pre><tt># Clone a repo (like git clone): |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1225 | git svn clone http://svn.example.com/project/trunk |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1226 | # Enter the newly cloned directory: |
| 1227 | cd trunk |
| 1228 | # You should be on master branch, double-check with git-branch |
| 1229 | git branch |
| 1230 | # Do some work and commit locally to git: |
| 1231 | git commit ... |
| 1232 | # Something is committed to SVN, rebase your local changes against the |
| 1233 | # latest changes in SVN: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1234 | git svn rebase |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1235 | # Now commit your changes (that were committed previously using git) to SVN, |
| 1236 | # as well as automatically updating your working HEAD: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1237 | git svn dcommit |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1238 | # Append svn:ignore settings to the default git exclude file: |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1239 | git svn show-ignore >> .git/info/exclude</tt></pre> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1240 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1241 | <div class="para"><p>Tracking and contributing to an entire Subversion-managed project |
| 1242 | (complete with a trunk, tags and branches):</p></div> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 1243 | <div class="listingblock"> |
| 1244 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1245 | <pre><tt># Clone a repo (like git clone): |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1246 | 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] | 1247 | # View all branches and tags you have cloned: |
| 1248 | git branch -r |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1249 | # Create a new branch in SVN |
| 1250 | git svn branch waldo |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1251 | # Reset your master to trunk (or any other branch, replacing 'trunk' |
| 1252 | # with the appropriate name): |
| 1253 | git reset --hard remotes/trunk |
| 1254 | # 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] | 1255 | # 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] | 1256 | </div></div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1257 | <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] | 1258 | (especially for large Subversion repositories). If multiple |
| 1259 | people (or one person with multiple machines) want to use |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1260 | <em>git-svn</em> to interact with the same Subversion repository, you can |
| 1261 | do the initial <em>git-svn clone</em> to a repository on a server and |
| 1262 | 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] | 1263 | <div class="listingblock"> |
| 1264 | <div class="content"> |
| 1265 | <pre><tt># Do the initial import on a server |
Junio C Hamano | a476efa | 2008-10-10 15:31:42 | [diff] [blame] | 1266 | ssh server "cd /pub && git svn clone http://svn.example.com/project |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1267 | # Clone locally - make sure the refs/remotes/ space matches the server |
| 1268 | mkdir project |
| 1269 | cd project |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1270 | git init |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1271 | git remote add origin server:/pub/project |
Junio C Hamano | 9e7b3f3 | 2008-06-29 08:49:03 | [diff] [blame] | 1272 | git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*' |
Junio C Hamano | f7bb669 | 2008-01-27 08:23:46 | [diff] [blame] | 1273 | git fetch |
Junio C Hamano | d3452a0 | 2008-11-15 08:07:55 | [diff] [blame] | 1274 | # Create a local branch from one of the branches just fetched |
| 1275 | git checkout -b master FETCH_HEAD |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1276 | # 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] | 1277 | git svn init http://svn.example.com/project |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1278 | # Pull the latest changes from Subversion |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1279 | git svn rebase</tt></pre> |
Junio C Hamano | e9bfa9b | 2007-08-07 06:06:11 | [diff] [blame] | 1280 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1281 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1282 | <h2 id="_rebase_vs_pull_merge">REBASE VS. PULL/MERGE</h2> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1283 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1284 | <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] | 1285 | pulled or merged from. This is because the author favored |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 1286 | <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] | 1287 | <tt>git svn set-tree A..B</tt> notation to commit multiple commits.</p></div> |
| 1288 | <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] | 1289 | 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] | 1290 | 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^] | 1291 | <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] | 1292 | when committing into SVN, which can lead to merge commits reversing |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1293 | previous commits in SVN.</p></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1294 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1295 | <h2 id="_design_philosophy">DESIGN PHILOSOPHY</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1296 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1297 | <div class="para"><p>Merge tracking in Subversion is lacking and doing branched development |
| 1298 | 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] | 1299 | copy history (including branches and tags) for repositories adopting a |
| 1300 | standard layout, it cannot yet represent merge history that happened |
| 1301 | inside git back upstream to SVN users. Therefore it is advised that |
| 1302 | users keep history as linear as possible inside git to ease |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1303 | compatibility with SVN (see the CAVEATS section below).</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1304 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1305 | <h2 id="_caveats">CAVEATS</h2> |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1306 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1307 | <div class="para"><p>For the sake of simplicity and interoperating with a less-capable system |
| 1308 | (SVN), it is recommended that all <em>git-svn</em> users clone, fetch and dcommit |
| 1309 | 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] | 1310 | operations between git repositories and branches. The recommended |
| 1311 | method of exchanging code between git branches and users is |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1312 | <em>git-format-patch</em> and <em>git-am</em>, or just 'dcommit'ing to the SVN repository.</p></div> |
| 1313 | <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] | 1314 | 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] | 1315 | reasonable or useful fashion; so users using Subversion cannot see any |
| 1316 | 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] | 1317 | 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] | 1318 | branch.</p></div> |
| 1319 | <div class="para"><p><em>git-clone</em> does not clone branches under the refs/remotes/ hierarchy or |
| 1320 | any <em>git-svn</em> metadata, or config. So repositories created and managed with |
| 1321 | using <em>git-svn</em> should use <em>rsync</em> for cloning, if cloning is to be done |
| 1322 | at all.</p></div> |
| 1323 | <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] | 1324 | 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] | 1325 | on the remote repository. This is generally considered bad practice, |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1326 | see the <a href="git-push.html">git-push(1)</a> documentation for details.</p></div> |
| 1327 | <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] | 1328 | already dcommitted. It is considered bad practice to --amend commits |
| 1329 | you've already pushed to a remote repository for other users, and |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1330 | dcommit with SVN is analogous to that.</p></div> |
Junio C Hamano | bdebabb | 2007-08-23 00:25:09 | [diff] [blame] | 1331 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1332 | <h2 id="_bugs">BUGS</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1333 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1334 | <div class="para"><p>We ignore all SVN properties except svn:executable. Any unhandled |
| 1335 | properties are logged to $GIT_DIR/svn/<refname>/unhandled.log</p></div> |
| 1336 | <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] | 1337 | tracked when committing to SVN. I do not plan on adding support for |
| 1338 | 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] | 1339 | the possible corner cases (git doesn't do it, either). Committing |
| 1340 | renamed and copied files are fully supported if they're similar enough |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1341 | for git to detect them.</p></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1342 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1343 | <h2 id="_configuration">CONFIGURATION</h2> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1344 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1345 | <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] | 1346 | repository .git/config file. It is similar the core git |
| 1347 | [remote] sections except <em>fetch</em> keys do not accept glob |
| 1348 | arguments; but they are instead handled by the <em>branches</em> |
| 1349 | and <em>tags</em> keys. Since some SVN repositories are oddly |
| 1350 | configured with multiple projects glob expansions such those |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1351 | listed below are allowed:</p></div> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1352 | <div class="listingblock"> |
| 1353 | <div class="content"> |
| 1354 | <pre><tt>[svn-remote "project-a"] |
| 1355 | url = http://server.org/svn |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1356 | fetch = trunk/project-a:refs/remotes/project-a/trunk |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1357 | branches = branches/*/project-a:refs/remotes/project-a/branches/* |
Junio C Hamano | 9572e92 | 2009-04-02 06:52:03 | [diff] [blame] | 1358 | tags = tags/*/project-a:refs/remotes/project-a/tags/*</tt></pre> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1359 | </div></div> |
Junio C Hamano | 0773834 | 2009-04-23 03:06:56 | [diff] [blame] | 1360 | <div class="para"><p>Keep in mind that the <em>*</em> (asterisk) wildcard of the local ref |
| 1361 | (right of the <em>:</em>) *must* be the farthest right path component; |
| 1362 | 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] | 1363 | independent path component (surrounded by <em>/</em> or EOL). This |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 1364 | type of configuration is not automatically created by <em>init</em> and |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1365 | should be manually entered with a text-editor or using <em>git-config</em>.</p></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1366 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1367 | <h2 id="_see_also">SEE ALSO</h2> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 1368 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1369 | <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] | 1370 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1371 | <h2 id="_author">Author</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1372 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1373 | <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] | 1374 | </div> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1375 | <h2 id="_documentation">Documentation</h2> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1376 | <div class="sectionbody"> |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 1377 | <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] | 1378 | </div> |
| 1379 | <div id="footer"> |
| 1380 | <div id="footer-text"> |
Junio C Hamano | 0e88f3e | 2009-06-21 08:03:25 | [diff] [blame^] | 1381 | Last updated 2009-06-21 08:03:02 UTC |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 1382 | </div> |
| 1383 | </div> |
| 1384 | </body> |
| 1385 | </html> |