Freitag, 6. Juli 2012

Migrating from SVN to Git

As I'm waiting for Martin to give me feedback on my most recent manuscript on a neuromorphic classifier, I had some time to do things I wanted to do for a long time, but always pushed back because there was something more important. In addition, today was Friday, and an very hot Friday in particular, so normal thinking was hardly possible - the perfect day for playing around with some nerd stuff like migrating my version control repository from SVN to Git!
I maintain code, figures, documents and all other stuff relevant to one project in a version control repository. I'm working on different machines remotely, e.g., the gaia cluster at FU, the server at KIP Heidelberg to which the neuromorphic hardware is connected, our local numbercrunchers and so on. I used to have a central SVN repository on our server, but this became the more cumbersome the more I had to deal with firewalls, limited bandwidth and working offline.
Briefly, I used two step-by-step guides: the one from John Albin, and the one in the Git Book. Both will essentially get you there, but the first one has a slightly more elegant solution to transform the authors, while the latter contains more details on what is actually going on. In addition, the Git Book is a good read to bridge the long, long time until a decent SVN repository is fully converted to Git. After all, if you migrate from SVN to Git you really want to know about the fundamental differences in Git compared to VCSs like SVN, and even more so the way Git stores your data.
Finally, where SVN needs 3.1 GB for the repo alone and another 8.5 GB for the checkout, I ended up with a git repository that contains the repo and the current version of all the stuff in a mere 2.9 GB. Wow. The entire process took three hours or so (plus some more hours of trial and error before ;) ). Now I'm hoping that Git will make it easier to keep all my data in sync across servers, irrespective the firewalls or stubborn svn clients insisting on correct https certificates, as long as I can ssh into them. But that's something for another day.
So finally this hot and humid Friday came to a productive end! Time to celebrate :) 

Keine Kommentare: