Migrating Subversion projects to Github

October 18 2012

1 comment. 0

Picking up where Dirk Olmes left off in the post, Migrating a MuleForge project to Github, we now suggest a utility to facilitate the migration: svn2git.

svn2git is a tiny utility for migrating projects from Subversion to Git while keeping the trunk, branches and tags where they should be.

This involves three basic steps:

  1. Getting the svn repository
  2. Creating a Git repository
  3. Pushing the trunk, tags and branches (previously added)

Step 1 is where svn2git is very appropriate.  To use it, you just need to execute the command “svn2git” followed by the url of the svn repository and the utility does the rest. Great, isn’t it?

Step 2 is really easy. You simply go to github.com and, after logging in with a account, create a repo following the help.github guide.

What Step 3 first requires you to add the directory to the git repository by executing

Next, the only thing left is to push all by executing

In most cases that’s it! The work is done. But we had some trouble while migrating our project. After executing Step 1, we received this error message:

After checking the process in more detail (adding –v to the command) we found the specific place where the mistake appeared:

To solve this, you only need to execute the fetch this way:

Problem solved!

Hope this helps. Good luck.

We'd love to hear your opinion on this post

One Response to “Migrating Subversion projects to Github”

  1. My spouse and i have been really cheerful Jordan could do his homework while using the precious recommendations he made when using the blog. It’s not at all simplistic to simply find yourself making a gift of tricks which often some others might have been making money from. And we fully understand we have got you to be grateful to for that. Most of the explanations you’ve made, the easy web site navigation, the friendships your site aid to promote – it’s got everything terrific, and it’s really letting our son in addition to our family do think that issue is excellent, which is highly vital. Many thanks for the whole lot!