I have a single SVN repository with the following current structure:
- project1
- branches
- trunk
- tags
- project2
- branches
- trunk
- tags
which originally had this structure:
- project
- branches
- trunk
- proj1
- proj2
- tags
That is, the project was split into two separate “subrepositories” (or whatever you want to call that)
Is there any way to migrate this to git without losing history?
Would svn2git be better that git-svn for this scenario? Is there any other migration tool?
EDIT: I tried git svn clone as suggested but, as I thought, it didn’t follow the move from the old structure to the new one. It only imported the revisions from the new structure.
First I converted the main trunk to git:
Then I converted each project:
Then for each project I attached the previous history from the main trunk using grafts and filter-branch.
I just blogged about it.