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