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" /> |
| 6 | <meta name="generator" content="AsciiDoc 7.0.2" /> |
| 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 | |
| 19 | a { color: blue; } |
| 20 | a:visited { color: fuchsia; } |
| 21 | |
| 22 | em { |
| 23 | font-style: italic; |
| 24 | } |
| 25 | |
| 26 | strong { |
| 27 | font-weight: bold; |
| 28 | } |
| 29 | |
| 30 | tt { |
| 31 | color: navy; |
| 32 | } |
| 33 | |
| 34 | h1, h2, h3, h4, h5, h6 { |
| 35 | color: #527bbd; |
| 36 | font-family: sans-serif; |
| 37 | margin-top: 1.2em; |
| 38 | margin-bottom: 0.5em; |
| 39 | line-height: 1.3; |
| 40 | } |
| 41 | |
| 42 | h1 { |
| 43 | border-bottom: 2px solid silver; |
| 44 | } |
| 45 | h2 { |
| 46 | border-bottom: 2px solid silver; |
| 47 | padding-top: 0.5em; |
| 48 | } |
| 49 | |
| 50 | div.sectionbody { |
| 51 | font-family: serif; |
| 52 | margin-left: 0; |
| 53 | } |
| 54 | |
| 55 | hr { |
| 56 | border: 1px solid silver; |
| 57 | } |
| 58 | |
| 59 | p { |
| 60 | margin-top: 0.5em; |
| 61 | margin-bottom: 0.5em; |
| 62 | } |
| 63 | |
| 64 | pre { |
| 65 | padding: 0; |
| 66 | margin: 0; |
| 67 | } |
| 68 | |
| 69 | span#author { |
| 70 | color: #527bbd; |
| 71 | font-family: sans-serif; |
| 72 | font-weight: bold; |
| 73 | font-size: 1.2em; |
| 74 | } |
| 75 | span#email { |
| 76 | } |
| 77 | span#revision { |
| 78 | font-family: sans-serif; |
| 79 | } |
| 80 | |
| 81 | div#footer { |
| 82 | font-family: sans-serif; |
| 83 | font-size: small; |
| 84 | border-top: 2px solid silver; |
| 85 | padding-top: 0.5em; |
| 86 | margin-top: 4.0em; |
| 87 | } |
| 88 | div#footer-text { |
| 89 | float: left; |
| 90 | padding-bottom: 0.5em; |
| 91 | } |
| 92 | div#footer-badges { |
| 93 | float: right; |
| 94 | padding-bottom: 0.5em; |
| 95 | } |
| 96 | |
| 97 | div#preamble, |
| 98 | div.tableblock, div.imageblock, div.exampleblock, div.verseblock, |
| 99 | div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, |
| 100 | div.admonitionblock { |
| 101 | margin-right: 10%; |
| 102 | margin-top: 1.5em; |
| 103 | margin-bottom: 1.5em; |
| 104 | } |
| 105 | div.admonitionblock { |
| 106 | margin-top: 2.5em; |
| 107 | margin-bottom: 2.5em; |
| 108 | } |
| 109 | |
| 110 | div.content { /* Block element content. */ |
| 111 | padding: 0; |
| 112 | } |
| 113 | |
| 114 | /* Block element titles. */ |
| 115 | div.title, caption.title { |
| 116 | font-family: sans-serif; |
| 117 | font-weight: bold; |
| 118 | text-align: left; |
| 119 | margin-top: 1.0em; |
| 120 | margin-bottom: 0.5em; |
| 121 | } |
| 122 | div.title + * { |
| 123 | margin-top: 0; |
| 124 | } |
| 125 | |
| 126 | td div.title:first-child { |
| 127 | margin-top: 0.0em; |
| 128 | } |
| 129 | div.content div.title:first-child { |
| 130 | margin-top: 0.0em; |
| 131 | } |
| 132 | div.content + div.title { |
| 133 | margin-top: 0.0em; |
| 134 | } |
| 135 | |
| 136 | div.sidebarblock > div.content { |
| 137 | background: #ffffee; |
| 138 | border: 1px solid silver; |
| 139 | padding: 0.5em; |
| 140 | } |
| 141 | |
| 142 | div.listingblock > div.content { |
| 143 | border: 1px solid silver; |
| 144 | background: #f4f4f4; |
| 145 | padding: 0.5em; |
| 146 | } |
| 147 | |
| 148 | div.quoteblock > div.content { |
| 149 | padding-left: 2.0em; |
| 150 | } |
| 151 | div.quoteblock .attribution { |
| 152 | text-align: right; |
| 153 | } |
| 154 | |
| 155 | div.admonitionblock .icon { |
| 156 | vertical-align: top; |
| 157 | font-size: 1.1em; |
| 158 | font-weight: bold; |
| 159 | text-decoration: underline; |
| 160 | color: #527bbd; |
| 161 | padding-right: 0.5em; |
| 162 | } |
| 163 | div.admonitionblock td.content { |
| 164 | padding-left: 0.5em; |
| 165 | border-left: 2px solid silver; |
| 166 | } |
| 167 | |
| 168 | div.exampleblock > div.content { |
| 169 | border-left: 2px solid silver; |
| 170 | padding: 0.5em; |
| 171 | } |
| 172 | |
| 173 | div.verseblock div.content { |
| 174 | white-space: pre; |
| 175 | } |
| 176 | |
| 177 | div.imageblock div.content { padding-left: 0; } |
| 178 | div.imageblock img { border: 1px solid silver; } |
| 179 | span.image img { border-style: none; } |
| 180 | |
| 181 | dl { |
| 182 | margin-top: 0.8em; |
| 183 | margin-bottom: 0.8em; |
| 184 | } |
| 185 | dt { |
| 186 | margin-top: 0.5em; |
| 187 | margin-bottom: 0; |
| 188 | font-style: italic; |
| 189 | } |
| 190 | dd > *:first-child { |
| 191 | margin-top: 0; |
| 192 | } |
| 193 | |
| 194 | ul, ol { |
| 195 | list-style-position: outside; |
| 196 | } |
| 197 | ol.olist2 { |
| 198 | list-style-type: lower-alpha; |
| 199 | } |
| 200 | |
| 201 | div.tableblock > table { |
| 202 | border-color: #527bbd; |
| 203 | border-width: 3px; |
| 204 | } |
| 205 | thead { |
| 206 | font-family: sans-serif; |
| 207 | font-weight: bold; |
| 208 | } |
| 209 | tfoot { |
| 210 | font-weight: bold; |
| 211 | } |
| 212 | |
| 213 | div.hlist { |
| 214 | margin-top: 0.8em; |
| 215 | margin-bottom: 0.8em; |
| 216 | } |
| 217 | td.hlist1 { |
| 218 | vertical-align: top; |
| 219 | font-style: italic; |
| 220 | padding-right: 0.8em; |
| 221 | } |
| 222 | td.hlist2 { |
| 223 | vertical-align: top; |
| 224 | } |
| 225 | |
| 226 | @media print { |
| 227 | div#footer-badges { display: none; } |
| 228 | } |
| 229 | include::./stylesheets/xhtml11-manpage.css[] |
| 230 | /* Workarounds for IE6's broken and incomplete CSS2. */ |
| 231 | |
| 232 | div.sidebar-content { |
| 233 | background: #ffffee; |
| 234 | border: 1px solid silver; |
| 235 | padding: 0.5em; |
| 236 | } |
| 237 | div.sidebar-title, div.image-title { |
| 238 | font-family: sans-serif; |
| 239 | font-weight: bold; |
| 240 | margin-top: 0.0em; |
| 241 | margin-bottom: 0.5em; |
| 242 | } |
| 243 | |
| 244 | div.listingblock div.content { |
| 245 | border: 1px solid silver; |
| 246 | background: #f4f4f4; |
| 247 | padding: 0.5em; |
| 248 | } |
| 249 | |
| 250 | div.quoteblock-content { |
| 251 | padding-left: 2.0em; |
| 252 | } |
| 253 | |
| 254 | div.exampleblock-content { |
| 255 | border-left: 2px solid silver; |
| 256 | padding-left: 0.5em; |
| 257 | } |
| 258 | </style> |
| 259 | <title>git-svn(1)</title> |
| 260 | </head> |
| 261 | <body> |
| 262 | <div id="header"> |
| 263 | <h1> |
| 264 | git-svn(1) Manual Page |
| 265 | </h1> |
| 266 | <h2>NAME</h2> |
| 267 | <div class="sectionbody"> |
| 268 | <p>git-svn - |
Junio C Hamano | 7c73c66 | 2007-01-19 00:37:50 | [diff] [blame] | 269 | Bidirectional operation between a single Subversion branch and git |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 270 | </p> |
| 271 | </div> |
| 272 | </div> |
| 273 | <h2>SYNOPSIS</h2> |
| 274 | <div class="sectionbody"> |
| 275 | <p><em>git-svn</em> <command> [options] [arguments]</p> |
| 276 | </div> |
| 277 | <h2>DESCRIPTION</h2> |
| 278 | <div class="sectionbody"> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 279 | <p>git-svn is a simple conduit for changesets between Subversion and git. |
| 280 | It is not to be confused with <a href="git-svnimport.html">git-svnimport(1)</a>, which is |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 281 | read-only.</p> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 282 | <p>git-svn was originally designed for an individual developer who wants a |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 283 | bidirectional flow of changesets between a single branch in Subversion |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 284 | and an arbitrary number of branches in git. Since its inception, |
| 285 | git-svn has gained the ability to track multiple branches in a manner |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 286 | similar to git-svnimport.</p> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 287 | <p>git-svn is especially useful when it comes to tracking repositories |
| 288 | not organized in the way Subversion developers recommend (trunk, |
| 289 | branches, tags directories).</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 290 | </div> |
| 291 | <h2>COMMANDS</h2> |
| 292 | <div class="sectionbody"> |
| 293 | <dl> |
| 294 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 295 | <em>init</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 296 | </dt> |
| 297 | <dd> |
| 298 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 299 | Initializes an empty git repository with additional |
| 300 | metadata directories for git-svn. The Subversion URL |
| 301 | may be specified as a command-line argument, or as full |
| 302 | URL arguments to -T/-t/-b. Optionally, the target |
| 303 | directory to operate on can be specified as a second |
| 304 | argument. Normally this command initializes the current |
| 305 | directory. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 306 | </p> |
| 307 | </dd> |
| 308 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 309 | -T<trunk_subdir> |
| 310 | </dt> |
| 311 | <dt> |
| 312 | --trunk=<trunk_subdir> |
| 313 | </dt> |
| 314 | <dt> |
| 315 | -t<tags_subdir> |
| 316 | </dt> |
| 317 | <dt> |
| 318 | --tags=<tags_subdir> |
| 319 | </dt> |
| 320 | <dt> |
| 321 | -b<branches_subdir> |
| 322 | </dt> |
| 323 | <dt> |
| 324 | --branches=<branches_subdir> |
| 325 | </dt> |
| 326 | <dd> |
| 327 | <p> |
| 328 | These are optional command-line options for init. Each of |
| 329 | these flags can point to a relative repository path |
| 330 | (--tags=project/tags') or a full url |
| 331 | (--tags=https://foo.org/project/tags) |
| 332 | </p> |
| 333 | </dd> |
| 334 | <dt> |
| 335 | --no-metadata |
| 336 | </dt> |
| 337 | <dd> |
| 338 | <p> |
| 339 | Set the <em>noMetadata</em> option in the [svn-remote] config. |
| 340 | </p> |
| 341 | </dd> |
| 342 | <dt> |
| 343 | --use-svm-props |
| 344 | </dt> |
| 345 | <dd> |
| 346 | <p> |
| 347 | Set the <em>useSvmProps</em> option in the [svn-remote] config. |
| 348 | </p> |
| 349 | </dd> |
| 350 | <dt> |
| 351 | --use-svnsync-props |
| 352 | </dt> |
| 353 | <dd> |
| 354 | <p> |
| 355 | Set the <em>useSvnsyncProps</em> option in the [svn-remote] config. |
| 356 | </p> |
| 357 | </dd> |
| 358 | <dt> |
| 359 | --rewrite-root=<URL> |
| 360 | </dt> |
| 361 | <dd> |
| 362 | <p> |
| 363 | Set the <em>rewriteRoot</em> option in the [svn-remote] config. |
| 364 | </p> |
| 365 | </dd> |
| 366 | <dt> |
| 367 | --username=<USER> |
| 368 | </dt> |
| 369 | <dd> |
| 370 | <p> |
| 371 | For transports that SVN handles authentication for (http, |
| 372 | https, and plain svn), specify the username. For other |
| 373 | transports (eg svn+ssh://), you must include the username in |
| 374 | the URL, eg svn+ssh://foo@svn.bar.com/project |
| 375 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 376 | </dd> |
| 377 | <dt> |
| 378 | --prefix=<prefix> |
| 379 | </dt> |
| 380 | <dd> |
| 381 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 382 | This allows one to specify a prefix which is prepended |
| 383 | to the names of remotes if trunk/branches/tags are |
| 384 | specified. The prefix does not automatically include a |
| 385 | trailing slash, so be sure you include one in the |
| 386 | argument if that is what you want. This is useful if |
| 387 | you wish to track multiple projects that share a common |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 388 | repository. |
| 389 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 390 | </dd> |
| 391 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 392 | <em>fetch</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 393 | </dt> |
| 394 | <dd> |
| 395 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 396 | Fetch unfetched revisions from the Subversion remote we are |
| 397 | tracking. The name of the [svn-remote "…"] section in the |
| 398 | .git/config file may be specified as an optional command-line |
| 399 | argument. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 400 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 401 | </dd> |
| 402 | <dt> |
| 403 | <em>clone</em> |
| 404 | </dt> |
| 405 | <dd> |
| 406 | <p> |
| 407 | Runs <em>init</em> and <em>fetch</em>. It will automatically create a |
| 408 | directory based on the basename of the URL passed to it; |
| 409 | or if a second argument is passed; it will create a directory |
| 410 | and work within that. It accepts all arguments that the |
| 411 | <em>init</em> and <em>fetch</em> commands accept; with the exception of |
| 412 | <em>--fetch-all</em>. After a repository is cloned, the <em>fetch</em> |
| 413 | command will be able to update revisions without affecting |
| 414 | the working tree; and the <em>rebase</em> command will be able |
| 415 | to update the working tree with the latest changes. |
| 416 | </p> |
| 417 | </dd> |
| 418 | <dt> |
| 419 | <em>rebase</em> |
| 420 | </dt> |
| 421 | <dd> |
| 422 | <p> |
| 423 | This fetches revisions from the SVN parent of the current HEAD |
| 424 | and rebases the current (uncommitted to SVN) work against it. |
| 425 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 426 | <p>This works similarly to <em>svn update</em> or <em>git-pull</em> except that |
| 427 | it preserves linear history with <em>git-rebase</em> instead of |
| 428 | <em>git-merge</em> for ease of dcommit-ing with git-svn.</p> |
| 429 | <p>This accepts all options that <em>git-svn fetch</em> and <em>git-rebase</em> |
| 430 | accepts. However <em>--fetch-all</em> only fetches from the current |
| 431 | [svn-remote], and not all [svn-remote] definitions.</p> |
| 432 | <p>Like <em>git-rebase</em>; this requires that the working tree be clean |
| 433 | and have no uncommitted changes.</p> |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 434 | <p>+</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 435 | </dd> |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 436 | </dl> |
| 437 | <dl> |
| 438 | <dt> |
| 439 | -l |
| 440 | </dt> |
| 441 | <dt> |
| 442 | --local |
| 443 | </dt> |
| 444 | <dd> |
| 445 | <p> |
| 446 | Do not fetch remotely; only run <em>git-rebase</em> against the |
| 447 | last fetched commit from the upstream SVN. |
| 448 | </p> |
| 449 | </dd> |
| 450 | </dl> |
| 451 | <p>+</p> |
| 452 | <dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 453 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 454 | <em>dcommit</em> |
| 455 | </dt> |
| 456 | <dd> |
| 457 | <p> |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 458 | Commit each diff from a specified head directly to the SVN |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 459 | repository, and then rebase or reset (depending on whether or |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 460 | not there is a diff between SVN and head). This will create |
| 461 | a revision in SVN for each commit in git. |
| 462 | It is recommended that you run git-svn fetch and rebase (not |
| 463 | pull or merge) your commits against the latest changes in the |
| 464 | SVN repository. |
Junio C Hamano | 511162f | 2006-12-13 06:35:48 | [diff] [blame] | 465 | An optional command-line argument may be specified as an |
| 466 | alternative to HEAD. |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 467 | This is advantageous over <em>set-tree</em> (below) because it produces |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 468 | cleaner, more linear history. |
| 469 | </p> |
| 470 | </dd> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 471 | </dl> |
| 472 | <dl> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 473 | <dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 474 | <em>log</em> |
| 475 | </dt> |
| 476 | <dd> |
| 477 | <p> |
| 478 | This should make it easy to look up svn log messages when svn |
| 479 | users refer to -r/--revision numbers. |
| 480 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 481 | <p>The following features from `svn log' are supported:</p> |
| 482 | <dl> |
| 483 | <dt> |
| 484 | --revision=<n>[:<n>] |
| 485 | </dt> |
| 486 | <dd> |
| 487 | <p> |
| 488 | is supported, non-numeric args are not: |
| 489 | HEAD, NEXT, BASE, PREV, etc … |
| 490 | </p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 491 | </dd> |
| 492 | <dt> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 493 | -v/--verbose |
| 494 | </dt> |
| 495 | <dd> |
| 496 | <p> |
| 497 | it's not completely compatible with the --verbose |
| 498 | output in svn log, but reasonably close. |
| 499 | </p> |
| 500 | </dd> |
| 501 | <dt> |
| 502 | --limit=<n> |
| 503 | </dt> |
| 504 | <dd> |
| 505 | <p> |
| 506 | is NOT the same as --max-count, doesn't count |
| 507 | merged/excluded commits |
| 508 | </p> |
| 509 | </dd> |
| 510 | <dt> |
| 511 | --incremental |
| 512 | </dt> |
| 513 | <dd> |
| 514 | <p> |
| 515 | supported |
| 516 | </p> |
| 517 | </dd> |
| 518 | </dl> |
| 519 | <p>New features:</p> |
| 520 | <dl> |
| 521 | <dt> |
| 522 | --show-commit |
| 523 | </dt> |
| 524 | <dd> |
| 525 | <p> |
| 526 | shows the git commit sha1, as well |
| 527 | </p> |
| 528 | </dd> |
| 529 | <dt> |
| 530 | --oneline |
| 531 | </dt> |
| 532 | <dd> |
| 533 | <p> |
| 534 | our version of --pretty=oneline |
| 535 | </p> |
| 536 | </dd> |
| 537 | </dl> |
| 538 | <p>Any other arguments are passed directly to `git log'</p> |
| 539 | </dd> |
| 540 | </dl> |
| 541 | <dl> |
| 542 | <dt> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 543 | <em>set-tree</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 544 | </dt> |
| 545 | <dd> |
| 546 | <p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 547 | You should consider using <em>dcommit</em> instead of this command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 548 | Commit specified commit or tree objects to SVN. This relies on |
| 549 | your imported fetch data being up-to-date. This makes |
| 550 | absolutely no attempts to do patching when committing to SVN, it |
| 551 | simply overwrites files with those specified in the tree or |
| 552 | commit. All merging is assumed to have taken place |
| 553 | independently of git-svn functions. |
| 554 | </p> |
| 555 | </dd> |
| 556 | <dt> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 557 | <em>show-ignore</em> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 558 | </dt> |
| 559 | <dd> |
| 560 | <p> |
| 561 | Recursively finds and lists the svn:ignore property on |
| 562 | directories. The output is suitable for appending to |
| 563 | the $GIT_DIR/info/exclude file. |
| 564 | </p> |
| 565 | </dd> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 566 | <dt> |
| 567 | <em>commit-diff</em> |
| 568 | </dt> |
| 569 | <dd> |
| 570 | <p> |
| 571 | Commits the diff of two tree-ish arguments from the |
Junio C Hamano | f9771f6 | 2007-01-17 17:42:30 | [diff] [blame] | 572 | command-line. This command is intended for interoperability with |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 573 | git-svnimport and does not rely on being inside an git-svn |
| 574 | init-ed repository. This command takes three arguments, (a) the |
| 575 | original tree to diff against, (b) the new tree result, (c) the |
| 576 | URL of the target Subversion repository. The final argument |
| 577 | (URL) may be omitted if you are working from a git-svn-aware |
| 578 | repository (that has been init-ed with git-svn). |
Junio C Hamano | 23db885 | 2006-11-09 23:35:53 | [diff] [blame] | 579 | The -r<revision> option is required for this. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 580 | </p> |
| 581 | </dd> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 582 | </dl> |
| 583 | </div> |
| 584 | <h2>OPTIONS</h2> |
| 585 | <div class="sectionbody"> |
| 586 | <dl> |
| 587 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 588 | --shared[={false|true|umask|group|all|world|everybody}] |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 589 | </dt> |
| 590 | <dt> |
| 591 | --template=<template_directory> |
| 592 | </dt> |
| 593 | <dd> |
| 594 | <p> |
| 595 | Only used with the <em>init</em> command. |
Junio C Hamano | 24351a8 | 2007-01-13 08:09:17 | [diff] [blame] | 596 | These are passed directly to <a href="git-init.html">git-init(1)</a>. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 597 | </p> |
| 598 | </dd> |
| 599 | <dt> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 600 | -r <ARG> |
| 601 | </dt> |
| 602 | <dt> |
| 603 | --revision <ARG> |
| 604 | </dt> |
| 605 | <dd> |
| 606 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 607 | Used with the <em>fetch</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 608 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 609 | <p>This allows revision ranges for partial/cauterized history |
| 610 | to be supported. $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges), |
| 611 | $NUMBER:HEAD, and BASE:$NUMBER are all supported.</p> |
| 612 | <p>This can allow you to make partial mirrors when running fetch; |
| 613 | but is generally not recommended because history will be skipped |
| 614 | and lost.</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 615 | </dd> |
| 616 | <dt> |
| 617 | - |
| 618 | </dt> |
| 619 | <dt> |
| 620 | --stdin |
| 621 | </dt> |
| 622 | <dd> |
| 623 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 624 | Only used with the <em>set-tree</em> command. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 625 | </p> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 626 | <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] | 627 | order. Only the leading sha1 is read from each line, so |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 628 | git-rev-list --pretty=oneline output can be used.</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 629 | </dd> |
| 630 | <dt> |
| 631 | --rmdir |
| 632 | </dt> |
| 633 | <dd> |
| 634 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 635 | 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] | 636 | </p> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 637 | <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] | 638 | behind. SVN can version empty directories, and they are not |
| 639 | removed by default if there are no files left in them. git |
| 640 | cannot version empty directories. Enabling this flag will make |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 641 | the commit to SVN act like git.</p> |
Junio C Hamano | 7ad22dc | 2007-01-29 02:55:48 | [diff] [blame] | 642 | <p>config key: svn.rmdir</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 643 | </dd> |
| 644 | <dt> |
| 645 | -e |
| 646 | </dt> |
| 647 | <dt> |
| 648 | --edit |
| 649 | </dt> |
| 650 | <dd> |
| 651 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 652 | 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] | 653 | </p> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 654 | <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] | 655 | default for objects that are commits, and forced on when committing |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 656 | tree objects.</p> |
Junio C Hamano | 7ad22dc | 2007-01-29 02:55:48 | [diff] [blame] | 657 | <p>config key: svn.edit</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 658 | </dd> |
| 659 | <dt> |
| 660 | -l<num> |
| 661 | </dt> |
| 662 | <dt> |
| 663 | --find-copies-harder |
| 664 | </dt> |
| 665 | <dd> |
| 666 | <p> |
Junio C Hamano | 4bf6dca | 2006-12-21 02:25:57 | [diff] [blame] | 667 | 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] | 668 | </p> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 669 | <p>They are both passed directly to git-diff-tree see |
| 670 | <a href="git-diff-tree.html">git-diff-tree(1)</a> for more information.</p> |
| 671 | <div class="verseblock"> |
Junio C Hamano | 7ad22dc | 2007-01-29 02:55:48 | [diff] [blame] | 672 | <div class="content">config key: svn.l |
| 673 | config key: svn.findcopiesharder</div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 674 | </dd> |
| 675 | <dt> |
| 676 | -A<filename> |
| 677 | </dt> |
| 678 | <dt> |
| 679 | --authors-file=<filename> |
| 680 | </dt> |
| 681 | <dd> |
| 682 | <p> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 683 | Syntax is compatible with the files used by git-svnimport and |
| 684 | git-cvsimport: |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 685 | </p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 686 | <div class="listingblock"> |
| 687 | <div class="content"> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 688 | <pre><tt> loginname = Joe User <user@example.com></tt></pre> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 689 | </div></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 690 | <p>If this option is specified and git-svn encounters an SVN |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 691 | committer name that does not exist in the authors-file, git-svn |
| 692 | will abort operation. The user will then have to add the |
| 693 | appropriate entry. Re-running the previous git-svn command |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 694 | after the authors-file is modified should continue operation.</p> |
Junio C Hamano | 7ad22dc | 2007-01-29 02:55:48 | [diff] [blame] | 695 | <p>config key: svn.authorsfile</p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 696 | </dd> |
| 697 | <dt> |
| 698 | -q |
| 699 | </dt> |
| 700 | <dt> |
| 701 | --quiet |
| 702 | </dt> |
| 703 | <dd> |
| 704 | <p> |
Junio C Hamano | deab036 | 2007-01-10 05:05:11 | [diff] [blame] | 705 | Make git-svn less verbose. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 706 | </p> |
| 707 | </dd> |
| 708 | <dt> |
| 709 | --repack[=<n>] |
| 710 | </dt> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 711 | <dt> |
| 712 | --repack-flags=<flags> |
| 713 | </dt> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 714 | <dd> |
| 715 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 716 | These should help keep disk usage sane for large fetches |
| 717 | with many revisions. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 718 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 719 | <p>--repack takes an optional argument for the number of revisions |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 720 | to fetch before repacking. This defaults to repacking every |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 721 | 1000 commits fetched if no argument is specified.</p> |
| 722 | <p>--repack-flags are passed directly to <a href="git-repack.html">git-repack(1)</a>.</p> |
| 723 | <div class="verseblock"> |
| 724 | <div class="content">config key: svn.repack |
| 725 | config key: svn.repackflags</div></div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 726 | </dd> |
| 727 | <dt> |
| 728 | -m |
| 729 | </dt> |
| 730 | <dt> |
| 731 | --merge |
| 732 | </dt> |
| 733 | <dt> |
| 734 | -s<strategy> |
| 735 | </dt> |
| 736 | <dt> |
| 737 | --strategy=<strategy> |
| 738 | </dt> |
| 739 | <dd> |
| 740 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 741 | 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] | 742 | </p> |
| 743 | <p>Passed directly to git-rebase when using <em>dcommit</em> if a |
| 744 | <em>git-reset</em> cannot be used (see dcommit).</p> |
| 745 | </dd> |
| 746 | <dt> |
| 747 | -n |
| 748 | </dt> |
| 749 | <dt> |
| 750 | --dry-run |
| 751 | </dt> |
| 752 | <dd> |
| 753 | <p> |
| 754 | This is only used with the <em>dcommit</em> command. |
| 755 | </p> |
| 756 | <p>Print out the series of git arguments that would show |
| 757 | which diffs would be committed to SVN.</p> |
| 758 | </dd> |
| 759 | </dl> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 760 | </div> |
| 761 | <h2>ADVANCED OPTIONS</h2> |
| 762 | <div class="sectionbody"> |
| 763 | <dl> |
| 764 | <dt> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 765 | -i<GIT_SVN_ID> |
| 766 | </dt> |
| 767 | <dt> |
| 768 | --id <GIT_SVN_ID> |
| 769 | </dt> |
| 770 | <dd> |
| 771 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 772 | This sets GIT_SVN_ID (instead of using the environment). This |
| 773 | allows the user to override the default refname to fetch from |
| 774 | when tracking a single URL. The <em>log</em> and <em>dcommit</em> commands |
| 775 | no longer require this switch as an argument. |
| 776 | </p> |
| 777 | </dd> |
| 778 | <dt> |
| 779 | -R<remote name> |
| 780 | </dt> |
| 781 | <dt> |
| 782 | --svn-remote <remote name> |
| 783 | </dt> |
| 784 | <dd> |
| 785 | <p> |
| 786 | Specify the [svn-remote "<remote name>"] section to use, |
| 787 | this allows SVN multiple repositories to be tracked. |
| 788 | Default: "svn" |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 789 | </p> |
| 790 | </dd> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 791 | <dt> |
| 792 | --follow-parent |
| 793 | </dt> |
| 794 | <dd> |
| 795 | <p> |
| 796 | This is especially helpful when we're tracking a directory |
| 797 | that has been moved around within the repository, or if we |
| 798 | started tracking a branch and never tracked the trunk it was |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 799 | descended from. This feature is enabled by default, use |
| 800 | --no-follow-parent to disable it. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 801 | </p> |
Junio C Hamano | 7ad22dc | 2007-01-29 02:55:48 | [diff] [blame] | 802 | <p>config key: svn.followparent</p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 803 | </dd> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 804 | </dl> |
| 805 | </div> |
| 806 | <h2>CONFIG FILE-ONLY OPTIONS</h2> |
| 807 | <div class="sectionbody"> |
| 808 | <dl> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 809 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 810 | svn.noMetadata |
| 811 | </dt> |
| 812 | <dt> |
| 813 | svn-remote.<name>.noMetadata |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 814 | </dt> |
| 815 | <dd> |
| 816 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 817 | This gets rid of the git-svn-id: lines at the end of every commit. |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 818 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 819 | <p>If you lose your .git/svn/git-svn/.rev_db file, git-svn will not |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 820 | be able to rebuild it and you won't be able to fetch again, |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 821 | either. This is fine for one-shot imports.</p> |
| 822 | <p>The <em>git-svn log</em> command will not work on repositories using |
| 823 | this, either. Using this conflicts with the <em>useSvmProps</em> |
| 824 | option for (hopefully) obvious reasons.</p> |
Junio C Hamano | 43d0134 | 2006-10-12 04:07:32 | [diff] [blame] | 825 | </dd> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 826 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 827 | svn.useSvmProps |
| 828 | </dt> |
| 829 | <dt> |
| 830 | svn-remote.<name>.useSvmProps |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 831 | </dt> |
| 832 | <dd> |
| 833 | <p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 834 | This allows git-svn to re-map repository URLs and UUIDs from |
| 835 | mirrors created using SVN::Mirror (or svk) for metadata. |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 836 | </p> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 837 | <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] | 838 | that the revision was created by SVN::Mirror (also used by SVK). |
| 839 | The property contains a repository UUID and a revision. We want |
| 840 | to make it look like we are mirroring the original URL, so |
| 841 | introduce a helper function that returns the original identity |
| 842 | URL and UUID, and use it when generating metadata in commit |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 843 | messages.</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 844 | </dd> |
| 845 | <dt> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 846 | svn.useSvnsyncProps |
| 847 | </dt> |
| 848 | <dt> |
| 849 | svn-remote.<name>.useSvnsyncprops |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 850 | </dt> |
| 851 | <dd> |
| 852 | <p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 853 | Similar to the useSvmProps option; this is for users |
| 854 | of the svnsync(1) command distributed with SVN 1.4.x and |
| 855 | later. |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 856 | </p> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 857 | </dd> |
| 858 | <dt> |
| 859 | svn-remote.<name>.rewriteRoot |
| 860 | </dt> |
| 861 | <dd> |
| 862 | <p> |
| 863 | This allows users to create repositories from alternate |
| 864 | URLs. For example, an administrator could run git-svn on the |
| 865 | server locally (accessing via file://) but wish to distribute |
| 866 | the repository with a public http:// or svn:// URL in the |
| 867 | metadata so users of it will see the public URL. |
| 868 | </p> |
| 869 | <p>Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps |
| 870 | options all affect the metadata generated and used by git-svn; they |
| 871 | <strong>must</strong> be set in the configuration file before any history is imported |
| 872 | and these settings should never be changed once they are set.</p> |
| 873 | <p>Additionally, only one of these four options can be used per-svn-remote |
| 874 | section because they affect the <em>git-svn-id:</em> metadata line.</p> |
Junio C Hamano | 47c1e3c | 2006-09-25 04:45:55 | [diff] [blame] | 875 | </dd> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 876 | </dl> |
Junio C Hamano | a3fd83c | 2007-03-02 10:34:36 | [diff] [blame] | 877 | </div> |
| 878 | <h2>BASIC EXAMPLES</h2> |
| 879 | <div class="sectionbody"> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 880 | <p>Tracking and contributing to a the trunk of a Subversion-managed project:</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 881 | <div class="listingblock"> |
| 882 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 883 | <pre><tt># Clone a repo (like git clone): |
| 884 | git-svn clone http://svn.foo.org/project/trunk |
| 885 | # Enter the newly cloned directory: |
| 886 | cd trunk |
| 887 | # You should be on master branch, double-check with git-branch |
| 888 | git branch |
| 889 | # Do some work and commit locally to git: |
| 890 | git commit ... |
| 891 | # Something is committed to SVN, rebase your local changes against the |
| 892 | # latest changes in SVN: |
| 893 | git-svn rebase |
| 894 | # Now commit your changes (that were committed previously using git) to SVN, |
| 895 | # as well as automatically updating your working HEAD: |
Junio C Hamano | a3e4626 | 2006-11-29 07:59:40 | [diff] [blame] | 896 | git-svn dcommit |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 897 | # Append svn:ignore settings to the default git exclude file: |
| 898 | git-svn show-ignore >> .git/info/exclude</tt></pre> |
| 899 | </div></div> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 900 | <p>Tracking and contributing to an entire Subversion-managed project |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 901 | (complete with a trunk, tags and branches):</p> |
Junio C Hamano | a8d072a | 2007-01-05 07:46:25 | [diff] [blame] | 902 | <div class="listingblock"> |
| 903 | <div class="content"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 904 | <pre><tt># Clone a repo (like git clone): |
| 905 | git-svn clone http://svn.foo.org/project -T trunk -b branches -t tags |
| 906 | # View all branches and tags you have cloned: |
| 907 | git branch -r |
| 908 | # Reset your master to trunk (or any other branch, replacing 'trunk' |
| 909 | # with the appropriate name): |
| 910 | git reset --hard remotes/trunk |
| 911 | # 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] | 912 | # 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] | 913 | </div></div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 914 | </div> |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 915 | <h2>REBASE VS. PULL/MERGE</h2> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 916 | <div class="sectionbody"> |
| 917 | <p>Originally, git-svn recommended that the remotes/git-svn branch be |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 918 | pulled or merged from. This is because the author favored |
| 919 | <em>git-svn set-tree B</em> to commit a single head rather than the |
| 920 | <em>git-svn set-tree A..B</em> notation to commit multiple commits.</p> |
| 921 | <p>If you use <em>git-svn set-tree A..B</em> to commit several diffs and you do |
| 922 | not have the latest remotes/git-svn merged into my-branch, you should |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 923 | use <em>git-svn rebase</em> to update your work branch instead of <em>git pull</em> or |
Junio C Hamano | 79770b6 | 2007-01-07 07:43:58 | [diff] [blame] | 924 | <em>git merge</em>. <em>pull/merge</em> can cause non-linear history to be flattened |
| 925 | when committing into SVN, which can lead to merge commits reversing |
| 926 | previous commits in SVN.</p> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 927 | </div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 928 | <h2>DESIGN PHILOSOPHY</h2> |
| 929 | <div class="sectionbody"> |
| 930 | <p>Merge tracking in Subversion is lacking and doing branched development |
Junio C Hamano | a3e4626 | 2006-11-29 07:59:40 | [diff] [blame] | 931 | with Subversion is cumbersome as a result. git-svn does not do |
| 932 | automated merge/branch tracking by default and leaves it entirely up to |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 933 | the user on the git side. git-svn does however follow copy |
| 934 | history of the directory that it is tracking, however (much like |
| 935 | how <em>svn log</em> works).</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 936 | </div> |
| 937 | <h2>BUGS</h2> |
| 938 | <div class="sectionbody"> |
Junio C Hamano | 00cb371 | 2007-02-23 11:13:52 | [diff] [blame] | 939 | <p>We ignore all SVN properties except svn:executable. Any unhandled |
| 940 | properties are logged to $GIT_DIR/svn/<refname>/unhandled.log</p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 941 | <p>Renamed and copied directories are not detected by git and hence not |
| 942 | tracked when committing to SVN. I do not plan on adding support for |
| 943 | 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] | 944 | the possible corner cases (git doesn't do it, either). Committing |
| 945 | renamed and copied files are fully supported if they're similar enough |
| 946 | for git to detect them.</p> |
| 947 | </div> |
| 948 | <h2>CONFIGURATION</h2> |
| 949 | <div class="sectionbody"> |
| 950 | <p>git-svn stores [svn-remote] configuration information in the |
| 951 | repository .git/config file. It is similar the core git |
| 952 | [remote] sections except <em>fetch</em> keys do not accept glob |
| 953 | arguments; but they are instead handled by the <em>branches</em> |
| 954 | and <em>tags</em> keys. Since some SVN repositories are oddly |
| 955 | configured with multiple projects glob expansions such those |
| 956 | listed below are allowed:</p> |
| 957 | <div class="listingblock"> |
| 958 | <div class="content"> |
| 959 | <pre><tt>[svn-remote "project-a"] |
| 960 | url = http://server.org/svn |
| 961 | branches = branches/*/project-a:refs/remotes/project-a/branches/* |
| 962 | tags = tags/*/project-a:refs/remotes/project-a/tags/* |
| 963 | trunk = trunk/project-a:refs/remotes/project-a/trunk</tt></pre> |
| 964 | </div></div> |
| 965 | <p>Keep in mind that the <em><strong></em> (asterisk) wildcard of the local ref |
| 966 | (left of the <em>:</em>) *must</strong> be the farthest right path component; |
| 967 | however the remote wildcard may be anywhere as long as it's own |
| 968 | independent path componet (surrounded by <em>/</em> or EOL). This |
| 969 | type of configuration is not automatically created by <em>init</em> and |
| 970 | should be manually entered with a text-editor or using |
| 971 | <a href="git-config.html">git-config(1)</a></p> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 972 | </div> |
Junio C Hamano | 6b2cee1 | 2006-08-26 08:43:31 | [diff] [blame] | 973 | <h2>SEE ALSO</h2> |
| 974 | <div class="sectionbody"> |
| 975 | <p><a href="git-rebase.html">git-rebase(1)</a></p> |
| 976 | </div> |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 977 | <h2>Author</h2> |
| 978 | <div class="sectionbody"> |
| 979 | <p>Written by Eric Wong <normalperson@yhbt.net>.</p> |
| 980 | </div> |
| 981 | <h2>Documentation</h2> |
| 982 | <div class="sectionbody"> |
| 983 | <p>Written by Eric Wong <normalperson@yhbt.net>.</p> |
| 984 | </div> |
| 985 | <div id="footer"> |
| 986 | <div id="footer-text"> |
Junio C Hamano | 103ad7f | 2007-03-14 11:19:26 | [diff] [blame] | 987 | Last updated 14-Mar-2007 11:19:13 UTC |
Junio C Hamano | 9ae1a06 | 2006-07-10 08:12:34 | [diff] [blame] | 988 | </div> |
| 989 | </div> |
| 990 | </body> |
| 991 | </html> |