what_i_am.upto(2010)

Tag: migration

Moving Repos and Redmine from SVN to Git

by Christoph Olszowka on Sep.11, 2009, under rails, ruby

Sorry for not posting in a long time (again), but I’ve been pretty busy with summer vacations, work, of course, The Ruby Toolbox and did not have any time to work on some OSS stuff.

What I did do, though, was to migrate two of our major app repositories from Subversion to Git together with my fellow colleague at Capita Unternehmensberatung, Sebastian, who despite being very jealous of my fancy new HTC Hero being so much cooler than his grumpy old T-Mobile G1, joined me on this one :)

Our main goals were to retain our Release Tags from SVN as Git Tags (not Branches!), which worked out perfectly after working through a couple of online resources on this topic, as well as updating our Redmine issue comments and time entries that included references to specific commits to reflect the changes in revision numbering.

For migrating the repositories, I’ve put together the required steps based upon this, this, and this into a gist, which you can work through manually and should end up with a sweet git repo. Only thing remaining is to set up a bare repository on your scm-server (git init –bare) and push everything over there (at least as long as you sticked to the default SVN repository structure of /tags, /branches and /trunk – everything else you’ll probably have to mess around with the listed commands).

For moving Redmine, we created a simple Ruby script which will work through all your git commit messages, create a hash out of the included svn revision id’s (from the initial migration), connect to your Redmine database and update everything properly. It’s also a gist. Remember you’ll have to do this on your Redmine server.

Further instructions and comments are also included inside the two gists, so check them out:

Happy migrating!

1 Comment :, , , , , , , more...

Looking for something?

Use the form below to search the site:

Recommended read!

A few highly recommended sites...