Determining SVN repo layout to migrate it to Git

Viewed 36

I am trying to migrate a bunch of SVN repos to GitHub. It is important for the client to keep his history since it contains important intellectual property information. I am at the stage on my test repo where I have to git svn clone the repository but the SVN is not in the standard layout and I can't for the life of me determine how the layout is related to the required trunks, branches and tags.

The root of the repo looks like this:

SVN root

The statmod folder has the most in it and looks like this:

statmod folder

I'm going insane trying to get this to work.

1 Answers

It looks like the directories listed in / are the branches.... so, try this:

git init . # work on a brand new git repo
git svn init --branches=/ path-to-statmod
# the previous command assumes that the repo is the path that provided the first list that you gave us (and so --branches points to its root, so that you get 4 branches)
git svn fetch

And wait paciently.

A little explanation: --branches tells git svn a directory in the svn repo where each one of its subdirectories is a branch. It looks like the first list there has the 4 branches in the project. Can you confirm if that's the case by looking at the content of another branch, like new?

Related