Reputation: 100186
A git svn clone
with --stdlayout
get me multiple branches if the source SVN repo has multiple branches (and tags).
I want to push all of them to another git repo. The git svn clone
did seem to have retrieved all the history for all the versions. Is this a matter of giving better instructions to git push?
Here's my possibly misguided workflow intention.
Here's the output of git branch -a
after running the git svn clone
.
/Users/benson/x/tsk/tsk_git_svn git branch -a
* master
remotes/origin/master
remotes/sleuthkit-3.0
remotes/sleuthkit-3.1
remotes/tags/sleuthkit-3.0.0
remotes/tags/sleuthkit-3.0.1
remotes/tags/sleuthkit-3.1.0
remotes/tags/sleuthkit-3.1.0b1
remotes/tags/sleuthkit-3.1.1
remotes/tags/sleuthkit-3.1.2
remotes/tags/sleuthkit-3.1.3
remotes/tags/sleuthkit-3.1.3b1
remotes/tags/sleuthkit-3.2.0b1
remotes/tags/sleuthkit-3.2.0b2
remotes/trunk
Upvotes: 3
Views: 860
Reputation: 8978
If you have an access to your SVN server, I would recommend 2 steps solution:
$ subgit install path/to/svn/repository
$ cd path/to/svn/repository
$ git push --all <target Git repository>
Note that the target Git repository should be bare to avoid problems (created by git init --bare command)
Upvotes: 0
Reputation: 1329032
you can try a git push --mirror
to be sure to push all references from one git repo to another:
from git push
:
--mirror
Instead of naming each ref to push, specifies that all refs under
refs/
(which includes but is not limited torefs/heads/
,refs/remotes/
, andrefs/tags/
) be mirrored to the remote repository.
Newly created local refs will be pushed to the remote end, locally updated refs will be force updated on the remote end, and deleted refs will be removed from the remote end.
But I would recommend svn2git
(if you don't plan to regularly update your svn repo), in order to get actual tags instead of "branches" for tags.
Upvotes: 2