tags:

views:

37

answers:

1

I converted a very large svn repository to a git repository with

git svn init svn/server/project --no-metadata
git svn fetch

This took the better part of two days to finish.

This repo should have quite a few branches but when I do "git branch" I get nothing but the master. They are listed under the branches directory, but shouldn't I see them with "git branch" as well?

"git branch -a" only shows master and remotes/git-svn.

Was it the --no-metadata switch that did this?

+3  A: 

When initializing the git repository you need to use either the --trunk, --branches and --tags options or the --stdlayout option to git svn init in order to tell it the path to the directories to the trunk, branches and tags directories in the subversion repository.

See the manual page for git-svn for additional details.

Pär Wieslander
I have read the manual page but I'm still not certain. So would "git svn init svn://server/project --stdlayout" be the correct command to transfer everything? Or use the those three separate parameters instead? Just want to make sure, as I said, it takes about two days to transfer the data so I wouldn't want to do it a third time...
Makis
Yes, `--stdlayout` should give you what you want if you have `trunk`, `tags` and `branches` directories according to the default subversion layout. But if you really want to be sure everything works right, try setting up a small test subversion repo and try to convert that one before trying to convert the real repo again.
Pär Wieslander
When I checkout a SVN Repository with git I use the command "git svn clone svn://server/project -T trunk -b branches -t tags" just to make sure I get everything I need. "--stdlayout" should work the same way.
Aurril
Makis
Oh yes, svn2git did the trick and it worked much, much faster than git svn.
Makis