Don't understand german? Read or subscribe to my english-only feed.

FAI: switch from Subversion to Git

Revision one in the Subversion repository of the FAI project dates back to the 27th of June 2000. Over the last few months we were discussing the switch to Git. At the last FAI meeting we decided to finally switch to Git and I volunteered to drive the migration. Today I officially did the migration.

I’ve been using git-svn to handle the FAI svn repository for at least as long as I’m wearing the FAI stable release manager hat. But the tags, author information,… inside my git-svn checkout weren’t ready for official publishing yet…

There are at least two different well known and referenced svn2git implementations out there. I decided to give the one hosted on github a shot because it’s mentioned at http://help.github.com/import-from-subversion/. It basically uses git-svn and just does the few annoying steps for you that I’d had to do manually otherwise. For more complex repositories the other svn2git implementation might be worth a try, especially since it’s supported by the svneverever tool. svneverever supports more flexible rules regarding the repository layout (it was used for switching Gentoo’s Portage from Subversion to Git). Luckily we didn’t need it in our situation and I had experience with git-svn on the FAI repository already, so…

Converting the repository was as simple as running:

% svn2git svn://svn.debian.org/svn/fai --authors ../fai-svnauthors

The ../fai-svnauthors file contains all the “svnuser = Realname <mail@example.org>” mappings to get the author information right. Some 41 minutes later svn2git finished its work. Finally I pushed the result to the FAI repository at github.

If you’re interested in the repository size of svn vs. git:

  • svn repository (server side): 155MB
  • svn checkout (client side): 318.3MB (4.3MB trunk, 301MB tags, 13MB branches)
  • git-svn checkout: 13MB
  • git repository/checkout: 7.1MB

One Response to “FAI: switch from Subversion to Git”

  1. mirabilos Says:

    “Gitorious is open source and freely available for download and personal use, whereas GitHub is closed-source.” – tss… http://mako.cc/writing/hill-free_tools.html

    “Gitorious is popular among open-source advocates, while GitHub remains popular among Gentoo and Ruby developers.” – haha :ž