Reputation:
I have a SVN repository with this file structure:
|---trunk
| |---project1
| |---project2
| |---project3
|
|--branches
| |---1.1
| |---project1
| |---project2
| |---project3
| |---1.2
| |---project1
| |---project2
| |---project3
|--tags
| |---1.1
| |---project1
| |---project2
| |---project3
| |---1.2
| |---project1
| |---project2
| |---project3
I would like to migrate everything to Git (keeping history), so that afterwards I have 3 git projects: project1, project2, and project3.
In order to do that, I was thinking that it would be a good idea to create a new repository for each project and then migrate each repository to Git.
I searched online but I cannot find a solution for this file structure. Should I use SVN filters or what? (I don't know much about SVN).
Upvotes: 4
Views: 1896
Reputation: 83635
While splitting the repository with SVN is possible, it will be much easier to do this with git, which is much more flexible when it comes to rewriting and reorganizing history. If you still insist, see below :-).
So my recommendation is:
If you have to do the splitting with Subversion, the only realistic option I see is to use svnadmin dump
and svndumpfilter
.
Basically, you will dump the whole repository to a file (requires admin access to the SVN server), then modify that dump file and create new SVN repos from it. The splitting is explained (for example) in the book "Version Control with Subversion", chapter Repository Maintenance - especially subsection "Filtering Repository History".
For a detailed explanation of a split + migration, see for example Migrating Subversion Repositories to Git – The definitive Guide for TeamForge Users by CollabNet (ironically, the company that founded the Subversion project).
Upvotes: 3