git svn
expects your repo to be in the following structure...
./bigsvn
├── branches
│ ├── project1
│ └── project3
├── tags
│ └── project2
└── trunk
├── project1
├── project2
└── project3
However, we often find that the svn monorepo is in the following structure...
./bigsvn
├── project1
│ ├── branches
│ ├── tags
│ └── trunk
├── project2
│ ├── branches
│ ├── tags
│ └── trunk
└── project3
├── branches
├── tags
└── trunk
This poses a challenge when migrating to git. Below are three options to deal with this issue.
Since the users a likely checking out each project seperately, you might want to simply break up the monorepo into several git repos. This is the simplest solution and the one that I recommend. I'm not a fan of monorepos at all. Don't get me started 😬.
Convert each part of the monorepo to a git repo using git svn
. Follow these instructions to convert from svn to git.
Convert each part of the monorepo to a git repo using git svn
. Follow these instructions to convert from svn to git.
Then use git subtree
to combine the various git repos into one. Follow these instructions to combine the git repos.
Rearrange the monorepo into the structure that git svn
expects. You want the final structure to look like this...
./bigsvn
├── branches
│ ├── project1
│ └── project3
├── tags
│ └── project2
└── trunk
├── project1
├── project2
└── project3