I'm trying to convert a Subversion repository to Git using reposurgeon, the repository holds several projects with the following layout:
<groupname>/<projectname>/{trunk,tags,branches}
I tried this reposurgeon script:
read <svnrepository.dump
sourcetype svn
prefer git
rebuild myrepository
But the result was a Git repository with a branch per group.
Is there a way to restrict the conversion to a single project?
Use the --include
option of svnadmin dump
to restrict the dump to one project, then repocutter
to strip away the path prefix.
svnadmin dump . --include '/<groupname>/<projectname>' |
repocutter pathrename '^<groupname>/<projectname>/' '' > svnrepository.dump
Then use reposurgeon
as before.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With