Skip to content

Commit ab81a36

Browse files
marcnarcEric Wong
authored andcommitted
git svn: Doc update for multiple branch and tag paths
Signed-off-by: Marc Branchaud <[email protected]> Acked-by: Eric Wong <[email protected]>
1 parent b5c9b38 commit ab81a36

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

Documentation/git-svn.txt

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ git-svn(1)
33

44
NAME
55
----
6-
git-svn - Bidirectional operation between a single Subversion branch and git
6+
git-svn - Bidirectional operation between a Subversion repository and git
77

88
SYNOPSIS
99
--------
@@ -15,13 +15,12 @@ DESCRIPTION
1515
It provides a bidirectional flow of changes between a Subversion and a git
1616
repository.
1717

18-
'git-svn' can track a single Subversion branch simply by using a
19-
URL to the branch, follow branches laid out in the Subversion recommended
20-
method (trunk, branches, tags directories) with the --stdlayout option, or
21-
follow branches in any layout with the -T/-t/-b options (see options to
22-
'init' below, and also the 'clone' command).
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).
2322

24-
Once tracking a Subversion branch (with any of the above methods), the git
23+
Once tracking a Subversion repository (with any of the above methods), the git
2524
repository can be updated from Subversion by the 'fetch' command and
2625
Subversion updated from git by the 'dcommit' command.
2726

@@ -48,8 +47,11 @@ COMMANDS
4847
--stdlayout;;
4948
These are optional command-line options for init. Each of
5049
these flags can point to a relative repository path
51-
(--tags=project/tags') or a full url
52-
(--tags=https://foo.org/project/tags). The option --stdlayout is
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
5355
a shorthand way of setting trunk,tags,branches as the relative paths,
5456
which is the Subversion default. If any of the other options are given
5557
as well, they take precedence.
@@ -205,6 +207,20 @@ config key: svn.commiturl (overwrites all svn-remote.<name>.commiturl options)
205207
Create a tag by using the tags_subdir instead of the branches_subdir
206208
specified during git svn init.
207209

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
217+
+
218+
git config --get-all svn-remote.<name>.branches
219+
git config --get-all svn-remote.<name>.tags
220+
+
221+
where <name> is the name of the SVN repository as specified by the -R option to
222+
'init' (or "svn" by default).
223+
208224
'tag'::
209225
Create a tag in the SVN repository. This is a shorthand for
210226
'branch -t'.
@@ -727,6 +743,16 @@ already dcommitted. It is considered bad practice to --amend commits
727743
you've already pushed to a remote repository for other users, and
728744
dcommit with SVN is analogous to that.
729745

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:
752+
753+
branches = stable/*:refs/remotes/svn/stable/*
754+
branches = debug/*:refs/remotes/svn/debug/*
755+
730756
BUGS
731757
----
732758

0 commit comments

Comments
 (0)