run_command: report failure to execute the program, but optionally don't
[git/dscho.git] / Documentation / git-svn.txt
blob7e9b9a042347bf286c6ea523bef1952f0c72dec9
1 git-svn(1)
2 ==========
4 NAME
5 ----
6 git-svn - Bidirectional operation between a Subversion repository and git
8 SYNOPSIS
9 --------
10 'git svn' <command> [options] [arguments]
12 DESCRIPTION
13 -----------
14 'git-svn' is a simple conduit for changesets between Subversion and git.
15 It provides a bidirectional flow of changes between a Subversion and a git
16 repository.
18 'git-svn' can track a standard Subversion repository,
19 following the common "trunk/branches/tags" layout, with the --stdlayout option.
20 It can also follow branches and tags in any layout with the -T/-t/-b options
21 (see options to 'init' below, and also the 'clone' command).
23 Once tracking a Subversion repository (with any of the above methods), the git
24 repository can be updated from Subversion by the 'fetch' command and
25 Subversion updated from git by the 'dcommit' command.
27 COMMANDS
28 --------
31 'init'::
32         Initializes an empty git repository with additional
33         metadata directories for 'git-svn'.  The Subversion URL
34         may be specified as a command-line argument, or as full
35         URL arguments to -T/-t/-b.  Optionally, the target
36         directory to operate on can be specified as a second
37         argument.  Normally this command initializes the current
38         directory.
40 -T<trunk_subdir>;;
41 --trunk=<trunk_subdir>;;
42 -t<tags_subdir>;;
43 --tags=<tags_subdir>;;
44 -b<branches_subdir>;;
45 --branches=<branches_subdir>;;
46 -s;;
47 --stdlayout;;
48         These are optional command-line options for init.  Each of
49         these flags can point to a relative repository path
50         (--tags=project/tags) or a full url
51         (--tags=https://foo.org/project/tags).
52         You can specify more than one --tags and/or --branches options, in case
53         your Subversion repository places tags or branches under multiple paths.
54         The option --stdlayout is
55         a shorthand way of setting trunk,tags,branches as the relative paths,
56         which is the Subversion default. If any of the other options are given
57         as well, they take precedence.
58 --no-metadata;;
59         Set the 'noMetadata' option in the [svn-remote] config.
60 --use-svm-props;;
61         Set the 'useSvmProps' option in the [svn-remote] config.
62 --use-svnsync-props;;
63         Set the 'useSvnsyncProps' option in the [svn-remote] config.
64 --rewrite-root=<URL>;;
65         Set the 'rewriteRoot' option in the [svn-remote] config.
66 --use-log-author;;
67         When retrieving svn commits into git (as part of fetch, rebase, or
68         dcommit operations), look for the first From: or Signed-off-by: line
69         in the log message and use that as the author string.
70 --add-author-from;;
71         When committing to svn from git (as part of commit or dcommit
72         operations), if the existing log message doesn't already have a
73         From: or Signed-off-by: line, append a From: line based on the
74         git commit's author string.  If you use this, then --use-log-author
75         will retrieve a valid author string for all commits.
76 --username=<USER>;;
77         For transports that SVN handles authentication for (http,
78         https, and plain svn), specify the username.  For other
79         transports (eg svn+ssh://), you must include the username in
80         the URL, eg svn+ssh://foo@svn.bar.com/project
81 --prefix=<prefix>;;
82         This allows one to specify a prefix which is prepended
83         to the names of remotes if trunk/branches/tags are
84         specified.  The prefix does not automatically include a
85         trailing slash, so be sure you include one in the
86         argument if that is what you want.  If --branches/-b is
87         specified, the prefix must include a trailing slash.
88         Setting a prefix is useful if you wish to track multiple
89         projects that share a common repository.
90 --ignore-paths=<regex>;;
91         When passed to 'init' or 'clone' this regular expression will
92         be preserved as a config key.  See 'fetch' for a description
93         of '--ignore-paths'.
95 'fetch'::
96         Fetch unfetched revisions from the Subversion remote we are
97         tracking.  The name of the [svn-remote "..."] section in the
98         .git/config file may be specified as an optional command-line
99         argument.
101 --localtime;;
102         Store Git commit times in the local timezone instead of UTC.  This
103         makes 'git-log' (even without --date=local) show the same times
104         that `svn log` would in the local timezone.
106 --parent;;
107         Fetch only from the SVN parent of the current HEAD.
109 This doesn't interfere with interoperating with the Subversion
110 repository you cloned from, but if you wish for your local Git
111 repository to be able to interoperate with someone else's local Git
112 repository, either don't use this option or you should both use it in
113 the same local timezone.
115 --ignore-paths=<regex>;;
116         This allows one to specify a Perl regular expression that will
117         cause skipping of all matching paths from checkout from SVN.
118         The '--ignore-paths' option should match for every 'fetch'
119         (including automatic fetches due to 'clone', 'dcommit',
120         'rebase', etc) on a given repository.
122 config key: svn-remote.<name>.ignore-paths
124         If the ignore-paths config key is set and the command
125         line option is also given, both regular expressions
126         will be used.
128 Examples:
130         --ignore-paths="^doc" - skip "doc*" directory for every
131             fetch.
133         --ignore-paths="^[^/]+/(?:branches|tags)" - skip
134             "branches" and "tags" of first level directories.
136 'clone'::
137         Runs 'init' and 'fetch'.  It will automatically create a
138         directory based on the basename of the URL passed to it;
139         or if a second argument is passed; it will create a directory
140         and work within that.  It accepts all arguments that the
141         'init' and 'fetch' commands accept; with the exception of
142         '--fetch-all'.   After a repository is cloned, the 'fetch'
143         command will be able to update revisions without affecting
144         the working tree; and the 'rebase' command will be able
145         to update the working tree with the latest changes.
147 'rebase'::
148         This fetches revisions from the SVN parent of the current HEAD
149         and rebases the current (uncommitted to SVN) work against it.
151 This works similarly to `svn update` or 'git-pull' except that
152 it preserves linear history with 'git-rebase' instead of
153 'git-merge' for ease of dcommitting with 'git-svn'.
155 This accepts all options that 'git-svn fetch' and 'git-rebase'
156 accept.  However, '--fetch-all' only fetches from the current
157 [svn-remote], and not all [svn-remote] definitions.
159 Like 'git-rebase'; this requires that the working tree be clean
160 and have no uncommitted changes.
162 -l;;
163 --local;;
164         Do not fetch remotely; only run 'git-rebase' against the
165         last fetched commit from the upstream SVN.
167 'dcommit'::
168         Commit each diff from a specified head directly to the SVN
169         repository, and then rebase or reset (depending on whether or
170         not there is a diff between SVN and head).  This will create
171         a revision in SVN for each commit in git.
172         It is recommended that you run 'git-svn' fetch and rebase (not
173         pull or merge) your commits against the latest changes in the
174         SVN repository.
175         An optional revision or branch argument may be specified, and
176         causes 'git-svn' to do all work on that revision/branch
177         instead of HEAD.
178         This is advantageous over 'set-tree' (below) because it produces
179         cleaner, more linear history.
181 --no-rebase;;
182         After committing, do not rebase or reset.
183 --commit-url <URL>;;
184         Commit to this SVN URL (the full path).  This is intended to
185         allow existing git-svn repositories created with one transport
186         method (e.g. `svn://` or `http://` for anonymous read) to be
187         reused if a user is later given access to an alternate transport
188         method (e.g. `svn+ssh://` or `https://`) for commit.
190 config key: svn-remote.<name>.commiturl
192 config key: svn.commiturl (overwrites all svn-remote.<name>.commiturl options)
194         Using this option for any other purpose (don't ask)
195         is very strongly discouraged.
198 'branch'::
199         Create a branch in the SVN repository.
201 -m;;
202 --message;;
203         Allows to specify the commit message.
205 -t;;
206 --tag;;
207         Create a tag by using the tags_subdir instead of the branches_subdir
208         specified during git svn init.
210 -d;;
211 --destination;;
212         If more than one --branches (or --tags) option was given to the 'init'
213         or 'clone' command, you must provide the location of the branch (or
214         tag) you wish to create in the SVN repository.  The value of this
215         option must match one of the paths specified by a --branches (or
216         --tags) option.  You can see these paths with the commands
218         git config --get-all svn-remote.<name>.branches
219         git config --get-all svn-remote.<name>.tags
221 where <name> is the name of the SVN repository as specified by the -R option to
222 'init' (or "svn" by default).
224 'tag'::
225         Create a tag in the SVN repository. This is a shorthand for
226         'branch -t'.
228 'log'::
229         This should make it easy to look up svn log messages when svn
230         users refer to -r/--revision numbers.
232 The following features from `svn log' are supported:
235 -r/--revision=<n>[:<n>];;
236         is supported, non-numeric args are not:
237         HEAD, NEXT, BASE, PREV, etc ...
238 -v/--verbose;;
239         it's not completely compatible with the --verbose
240         output in svn log, but reasonably close.
241 --limit=<n>;;
242         is NOT the same as --max-count, doesn't count
243         merged/excluded commits
244 --incremental;;
245         supported
248 New features:
251 --show-commit;;
252         shows the git commit sha1, as well
253 --oneline;;
254         our version of --pretty=oneline
257 NOTE: SVN itself only stores times in UTC and nothing else. The regular svn
258 client converts the UTC time to the local time (or based on the TZ=
259 environment). This command has the same behaviour.
261 Any other arguments are passed directly to 'git-log'
263 'blame'::
264        Show what revision and author last modified each line of a file. The
265        output of this mode is format-compatible with the output of
266        `svn blame' by default. Like the SVN blame command,
267        local uncommitted changes in the working copy are ignored;
268        the version of the file in the HEAD revision is annotated. Unknown
269        arguments are passed directly to 'git-blame'.
271 --git-format;;
272         Produce output in the same format as 'git-blame', but with
273         SVN revision numbers instead of git commit hashes. In this mode,
274         changes that haven't been committed to SVN (including local
275         working-copy edits) are shown as revision 0.
278 'find-rev'::
279         When given an SVN revision number of the form 'rN', returns the
280         corresponding git commit hash (this can optionally be followed by a
281         tree-ish to specify which branch should be searched).  When given a
282         tree-ish, returns the corresponding SVN revision number.
284 'set-tree'::
285         You should consider using 'dcommit' instead of this command.
286         Commit specified commit or tree objects to SVN.  This relies on
287         your imported fetch data being up-to-date.  This makes
288         absolutely no attempts to do patching when committing to SVN, it
289         simply overwrites files with those specified in the tree or
290         commit.  All merging is assumed to have taken place
291         independently of 'git-svn' functions.
293 'create-ignore'::
294         Recursively finds the svn:ignore property on directories and
295         creates matching .gitignore files. The resulting files are staged to
296         be committed, but are not committed. Use -r/--revision to refer to a
297         specific revision.
299 'show-ignore'::
300         Recursively finds and lists the svn:ignore property on
301         directories.  The output is suitable for appending to
302         the $GIT_DIR/info/exclude file.
304 'commit-diff'::
305         Commits the diff of two tree-ish arguments from the
306         command-line.  This command does not rely on being inside an `git-svn
307         init`-ed repository.  This command takes three arguments, (a) the
308         original tree to diff against, (b) the new tree result, (c) the
309         URL of the target Subversion repository.  The final argument
310         (URL) may be omitted if you are working from a 'git-svn'-aware
311         repository (that has been `init`-ed with 'git-svn').
312         The -r<revision> option is required for this.
314 'info'::
315         Shows information about a file or directory similar to what
316         `svn info' provides.  Does not currently support a -r/--revision
317         argument.  Use the --url option to output only the value of the
318         'URL:' field.
320 'proplist'::
321         Lists the properties stored in the Subversion repository about a
322         given file or directory.  Use -r/--revision to refer to a specific
323         Subversion revision.
325 'propget'::
326         Gets the Subversion property given as the first argument, for a
327         file.  A specific revision can be specified with -r/--revision.
329 'show-externals'::
330         Shows the Subversion externals.  Use -r/--revision to specify a
331         specific revision.
333 'reset'::
334         Undoes the effects of 'fetch' back to the specified revision.
335         This allows you to re-'fetch' an SVN revision.  Normally the
336         contents of an SVN revision should never change and 'reset'
337         should not be necessary.  However, if SVN permissions change,
338         or if you alter your --ignore-paths option, a 'fetch' may fail
339         with "not found in commit" (file not previously visible) or
340         "checksum mismatch" (missed a modification).  If the problem
341         file cannot be ignored forever (with --ignore-paths) the only
342         way to repair the repo is to use 'reset'.
344 Only the rev_map and refs/remotes/git-svn are changed.  Follow 'reset'
345 with a 'fetch' and then 'git-reset' or 'git-rebase' to move local
346 branches onto the new tree.
348 -r/--revision=<n>;;
349         Specify the most recent revision to keep.  All later revisions
350         are discarded.
351 -p/--parent;;
352         Discard the specified revision as well, keeping the nearest
353         parent instead.
354 Example:;;
355 Assume you have local changes in "master", but you need to refetch "r2".
357 ------------
358     r1---r2---r3 remotes/git-svn
359                 \
360                  A---B master
361 ------------
363 Fix the ignore-paths or SVN permissions problem that caused "r2" to
364 be incomplete in the first place.  Then:
366 [verse]
367 git svn reset -r2 -p
368 git svn fetch
370 ------------
371     r1---r2'--r3' remotes/git-svn
372       \
373        r2---r3---A---B master
374 ------------
376 Then fixup "master" with 'git-rebase'.
377 Do NOT use 'git-merge' or your history will not be compatible with a
378 future 'dcommit'!
380 [verse]
381 git rebase --onto remotes/git-svn A^ master
383 ------------
384     r1---r2'--r3' remotes/git-svn
385                 \
386                  A'--B' master
387 ------------
392 OPTIONS
393 -------
396 --shared[={false|true|umask|group|all|world|everybody}]::
397 --template=<template_directory>::
398         Only used with the 'init' command.
399         These are passed directly to 'git-init'.
401 -r <ARG>::
402 --revision <ARG>::
404 Used with the 'fetch' command.
406 This allows revision ranges for partial/cauterized history
407 to be supported.  $NUMBER, $NUMBER1:$NUMBER2 (numeric ranges),
408 $NUMBER:HEAD, and BASE:$NUMBER are all supported.
410 This can allow you to make partial mirrors when running fetch;
411 but is generally not recommended because history will be skipped
412 and lost.
415 --stdin::
417 Only used with the 'set-tree' command.
419 Read a list of commits from stdin and commit them in reverse
420 order.  Only the leading sha1 is read from each line, so
421 'git-rev-list --pretty=oneline' output can be used.
423 --rmdir::
425 Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
427 Remove directories from the SVN tree if there are no files left
428 behind.  SVN can version empty directories, and they are not
429 removed by default if there are no files left in them.  git
430 cannot version empty directories.  Enabling this flag will make
431 the commit to SVN act like git.
433 config key: svn.rmdir
435 -e::
436 --edit::
438 Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
440 Edit the commit message before committing to SVN.  This is off by
441 default for objects that are commits, and forced on when committing
442 tree objects.
444 config key: svn.edit
446 -l<num>::
447 --find-copies-harder::
449 Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
451 They are both passed directly to 'git-diff-tree'; see
452 linkgit:git-diff-tree[1] for more information.
454 [verse]
455 config key: svn.l
456 config key: svn.findcopiesharder
458 -A<filename>::
459 --authors-file=<filename>::
461 Syntax is compatible with the file used by 'git-cvsimport':
463 ------------------------------------------------------------------------
464         loginname = Joe User <user@example.com>
465 ------------------------------------------------------------------------
467 If this option is specified and 'git-svn' encounters an SVN
468 committer name that does not exist in the authors-file, 'git-svn'
469 will abort operation. The user will then have to add the
470 appropriate entry.  Re-running the previous 'git-svn' command
471 after the authors-file is modified should continue operation.
473 config key: svn.authorsfile
475 --authors-prog=<filename>::
477 If this option is specified, for each SVN committer name that does not
478 exist in the authors file, the given file is executed with the committer
479 name as the first argument.  The program is expected to return a single
480 line of the form "Name <email>", which will be treated as if included in
481 the authors file.
483 -q::
484 --quiet::
485         Make 'git-svn' less verbose. Specify a second time to make it
486         even less verbose.
488 --repack[=<n>]::
489 --repack-flags=<flags>::
491 These should help keep disk usage sane for large fetches
492 with many revisions.
494 --repack takes an optional argument for the number of revisions
495 to fetch before repacking.  This defaults to repacking every
496 1000 commits fetched if no argument is specified.
498 --repack-flags are passed directly to 'git-repack'.
500 [verse]
501 config key: svn.repack
502 config key: svn.repackflags
504 -m::
505 --merge::
506 -s<strategy>::
507 --strategy=<strategy>::
509 These are only used with the 'dcommit' and 'rebase' commands.
511 Passed directly to 'git-rebase' when using 'dcommit' if a
512 'git-reset' cannot be used (see 'dcommit').
514 -n::
515 --dry-run::
517 This can be used with the 'dcommit', 'rebase', 'branch' and 'tag'
518 commands.
520 For 'dcommit', print out the series of git arguments that would show
521 which diffs would be committed to SVN.
523 For 'rebase', display the local branch associated with the upstream svn
524 repository associated with the current branch and the URL of svn
525 repository that will be fetched from.
527 For 'branch' and 'tag', display the urls that will be used for copying when
528 creating the branch or tag.
532 ADVANCED OPTIONS
533 ----------------
536 -i<GIT_SVN_ID>::
537 --id <GIT_SVN_ID>::
539 This sets GIT_SVN_ID (instead of using the environment).  This
540 allows the user to override the default refname to fetch from
541 when tracking a single URL.  The 'log' and 'dcommit' commands
542 no longer require this switch as an argument.
544 -R<remote name>::
545 --svn-remote <remote name>::
546         Specify the [svn-remote "<remote name>"] section to use,
547         this allows SVN multiple repositories to be tracked.
548         Default: "svn"
550 --follow-parent::
551         This is especially helpful when we're tracking a directory
552         that has been moved around within the repository, or if we
553         started tracking a branch and never tracked the trunk it was
554         descended from. This feature is enabled by default, use
555         --no-follow-parent to disable it.
557 config key: svn.followparent
560 CONFIG FILE-ONLY OPTIONS
561 ------------------------
564 svn.noMetadata::
565 svn-remote.<name>.noMetadata::
567 This gets rid of the 'git-svn-id:' lines at the end of every commit.
569 If you lose your .git/svn/git-svn/.rev_db file, 'git-svn' will not
570 be able to rebuild it and you won't be able to fetch again,
571 either.  This is fine for one-shot imports.
573 The 'git-svn log' command will not work on repositories using
574 this, either.  Using this conflicts with the 'useSvmProps'
575 option for (hopefully) obvious reasons.
577 svn.useSvmProps::
578 svn-remote.<name>.useSvmProps::
580 This allows 'git-svn' to re-map repository URLs and UUIDs from
581 mirrors created using SVN::Mirror (or svk) for metadata.
583 If an SVN revision has a property, "svm:headrev", it is likely
584 that the revision was created by SVN::Mirror (also used by SVK).
585 The property contains a repository UUID and a revision.  We want
586 to make it look like we are mirroring the original URL, so
587 introduce a helper function that returns the original identity
588 URL and UUID, and use it when generating metadata in commit
589 messages.
591 svn.useSvnsyncProps::
592 svn-remote.<name>.useSvnsyncprops::
593         Similar to the useSvmProps option; this is for users
594         of the svnsync(1) command distributed with SVN 1.4.x and
595         later.
597 svn-remote.<name>.rewriteRoot::
598         This allows users to create repositories from alternate
599         URLs.  For example, an administrator could run 'git-svn' on the
600         server locally (accessing via file://) but wish to distribute
601         the repository with a public http:// or svn:// URL in the
602         metadata so users of it will see the public URL.
604 svn.brokenSymlinkWorkaround::
605 This disables potentially expensive checks to workaround broken symlinks
606 checked into SVN by broken clients.  Set this option to "false" if you
607 track a SVN repository with many empty blobs that are not symlinks.
608 This option may be changed while "git-svn" is running and take effect on
609 the next revision fetched.  If unset, git-svn assumes this option to be
610 "true".
614 Since the noMetadata, rewriteRoot, useSvnsyncProps and useSvmProps
615 options all affect the metadata generated and used by 'git-svn'; they
616 *must* be set in the configuration file before any history is imported
617 and these settings should never be changed once they are set.
619 Additionally, only one of these four options can be used per-svn-remote
620 section because they affect the 'git-svn-id:' metadata line.
623 BASIC EXAMPLES
624 --------------
626 Tracking and contributing to the trunk of a Subversion-managed project:
628 ------------------------------------------------------------------------
629 # Clone a repo (like git clone):
630         git svn clone http://svn.example.com/project/trunk
631 # Enter the newly cloned directory:
632         cd trunk
633 # You should be on master branch, double-check with git-branch
634         git branch
635 # Do some work and commit locally to git:
636         git commit ...
637 # Something is committed to SVN, rebase your local changes against the
638 # latest changes in SVN:
639         git svn rebase
640 # Now commit your changes (that were committed previously using git) to SVN,
641 # as well as automatically updating your working HEAD:
642         git svn dcommit
643 # Append svn:ignore settings to the default git exclude file:
644         git svn show-ignore >> .git/info/exclude
645 ------------------------------------------------------------------------
647 Tracking and contributing to an entire Subversion-managed project
648 (complete with a trunk, tags and branches):
650 ------------------------------------------------------------------------
651 # Clone a repo (like git clone):
652         git svn clone http://svn.example.com/project -T trunk -b branches -t tags
653 # View all branches and tags you have cloned:
654         git branch -r
655 # Create a new branch in SVN
656     git svn branch waldo
657 # Reset your master to trunk (or any other branch, replacing 'trunk'
658 # with the appropriate name):
659         git reset --hard remotes/trunk
660 # You may only dcommit to one branch/tag/trunk at a time.  The usage
661 # of dcommit/rebase/show-ignore should be the same as above.
662 ------------------------------------------------------------------------
664 The initial 'git-svn clone' can be quite time-consuming
665 (especially for large Subversion repositories). If multiple
666 people (or one person with multiple machines) want to use
667 'git-svn' to interact with the same Subversion repository, you can
668 do the initial 'git-svn clone' to a repository on a server and
669 have each person clone that repository with 'git-clone':
671 ------------------------------------------------------------------------
672 # Do the initial import on a server
673         ssh server "cd /pub && git svn clone http://svn.example.com/project
674 # Clone locally - make sure the refs/remotes/ space matches the server
675         mkdir project
676         cd project
677         git init
678         git remote add origin server:/pub/project
679         git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
680         git fetch
681 # Create a local branch from one of the branches just fetched
682         git checkout -b master FETCH_HEAD
683 # Initialize git-svn locally (be sure to use the same URL and -T/-b/-t options as were used on server)
684         git svn init http://svn.example.com/project
685 # Pull the latest changes from Subversion
686         git svn rebase
687 ------------------------------------------------------------------------
689 REBASE VS. PULL/MERGE
690 ---------------------
692 Originally, 'git-svn' recommended that the 'remotes/git-svn' branch be
693 pulled or merged from.  This is because the author favored
694 `git svn set-tree B` to commit a single head rather than the
695 `git svn set-tree A..B` notation to commit multiple commits.
697 If you use `git svn set-tree A..B` to commit several diffs and you do
698 not have the latest remotes/git-svn merged into my-branch, you should
699 use `git svn rebase` to update your work branch instead of `git pull` or
700 `git merge`.  `pull`/`merge` can cause non-linear history to be flattened
701 when committing into SVN, which can lead to merge commits reversing
702 previous commits in SVN.
704 DESIGN PHILOSOPHY
705 -----------------
706 Merge tracking in Subversion is lacking and doing branched development
707 with Subversion can be cumbersome as a result.  While 'git-svn' can track
708 copy history (including branches and tags) for repositories adopting a
709 standard layout, it cannot yet represent merge history that happened
710 inside git back upstream to SVN users.  Therefore it is advised that
711 users keep history as linear as possible inside git to ease
712 compatibility with SVN (see the CAVEATS section below).
714 CAVEATS
715 -------
717 For the sake of simplicity and interoperating with a less-capable system
718 (SVN), it is recommended that all 'git-svn' users clone, fetch and dcommit
719 directly from the SVN server, and avoid all 'git-clone'/'pull'/'merge'/'push'
720 operations between git repositories and branches.  The recommended
721 method of exchanging code between git branches and users is
722 'git-format-patch' and 'git-am', or just 'dcommit'ing to the SVN repository.
724 Running 'git-merge' or 'git-pull' is NOT recommended on a branch you
725 plan to 'dcommit' from.  Subversion does not represent merges in any
726 reasonable or useful fashion; so users using Subversion cannot see any
727 merges you've made.  Furthermore, if you merge or pull from a git branch
728 that is a mirror of an SVN branch, 'dcommit' may commit to the wrong
729 branch.
731 'git-clone' does not clone branches under the refs/remotes/ hierarchy or
732 any 'git-svn' metadata, or config.  So repositories created and managed with
733 using 'git-svn' should use 'rsync' for cloning, if cloning is to be done
734 at all.
736 Since 'dcommit' uses rebase internally, any git branches you 'git-push' to
737 before 'dcommit' on will require forcing an overwrite of the existing ref
738 on the remote repository.  This is generally considered bad practice,
739 see the linkgit:git-push[1] documentation for details.
741 Do not use the --amend option of linkgit:git-commit[1] on a change you've
742 already dcommitted.  It is considered bad practice to --amend commits
743 you've already pushed to a remote repository for other users, and
744 dcommit with SVN is analogous to that.
746 When using multiple --branches or --tags, 'git-svn' does not automatically
747 handle name collisions (for example, if two branches from different paths have
748 the same name, or if a branch and a tag have the same name).  In these cases,
749 use 'init' to set up your git repository then, before your first 'fetch', edit
750 the .git/config file so that the branches and tags are associated with
751 different name spaces.  For example:
753         branches = stable/*:refs/remotes/svn/stable/*
754         branches = debug/*:refs/remotes/svn/debug/*
756 BUGS
757 ----
759 We ignore all SVN properties except svn:executable.  Any unhandled
760 properties are logged to $GIT_DIR/svn/<refname>/unhandled.log
762 Renamed and copied directories are not detected by git and hence not
763 tracked when committing to SVN.  I do not plan on adding support for
764 this as it's quite difficult and time-consuming to get working for all
765 the possible corner cases (git doesn't do it, either).  Committing
766 renamed and copied files are fully supported if they're similar enough
767 for git to detect them.
769 CONFIGURATION
770 -------------
772 'git-svn' stores [svn-remote] configuration information in the
773 repository .git/config file.  It is similar the core git
774 [remote] sections except 'fetch' keys do not accept glob
775 arguments; but they are instead handled by the 'branches'
776 and 'tags' keys.  Since some SVN repositories are oddly
777 configured with multiple projects glob expansions such those
778 listed below are allowed:
780 ------------------------------------------------------------------------
781 [svn-remote "project-a"]
782         url = http://server.org/svn
783         fetch = trunk/project-a:refs/remotes/project-a/trunk
784         branches = branches/*/project-a:refs/remotes/project-a/branches/*
785         tags = tags/*/project-a:refs/remotes/project-a/tags/*
786 ------------------------------------------------------------------------
788 Keep in mind that the '\*' (asterisk) wildcard of the local ref
789 (right of the ':') *must* be the farthest right path component;
790 however the remote wildcard may be anywhere as long as it's an
791 independent path component (surrounded by '/' or EOL).   This
792 type of configuration is not automatically created by 'init' and
793 should be manually entered with a text-editor or using 'git-config'.
795 SEE ALSO
796 --------
797 linkgit:git-rebase[1]
799 Author
800 ------
801 Written by Eric Wong <normalperson@yhbt.net>.
803 Documentation
804 -------------
805 Written by Eric Wong <normalperson@yhbt.net>.