For Git, see the instructions at http://github.com/guides/import-from-subversion
The last time that I did it manually, I used the commands below. (This was for a project which did not use tags or branches. Using svn2git might produce better results than git-svn if you have tags or branches.)
cat "mysvnusername = Me Myself <[email protected]>" >> authors.txt
svnserve --daemon --foreground --root <SVN-REPO-PARENT-DIR>
git svn clone --stdlayout --authors-file=authors.txt --no-metadata svn://localhost/<SVN-REPO-NAME>
# push to a public repo and clone from there, to get push/pull working easily
cd <SVN-REPO-NAME>
git remote add origin [email protected]:mygithubusername/<GIT-REPO-NAME>.git
git push origin master
cd ..
rm -rf <SVN-REPO-NAME>
git clone [email protected]:mygithubusername/<GIT-REPO-NAME>.git
But since you have a non-standard SVN repository layout, you will need to specify the --trunk, --tags and --branches parameters instead of --stdlayout for git svn clone.
To represent the whole inheritance history of your repository, you could try reordering your repository so that instead of a non-standard hierarchy you would have a standard flat repository layout:
/branches/original-0.1
/branches/original-0.2
/branches/variantA-trunk
/branches/variantA-who-branch_for_xxx
/branches/variantA-she-branch_for_yyy
/branches/variantB-trunk
/branches/variantB-who-branch_for_zzz
...
That should make it easier for import tools to understand the repository. Then when they have been imported, you can reorganize them better inside the new repository.
Also, I've heard that Git 1.6.x supports deep cloning, so that you can give to git svn clone
parameters such as --branches=branches/*/*
which will look deep into the hierarchy for branches. See this post for an example of using it.