SVN to (existing) git repository in 3 steps

Today I migrated Morrigan (my media player and manger project) from a private SVN server to an existing repository. Usually I would not bother writing up such mundane things, but this was so easy I wanted to make the point.

Assuming an existing target git repository called `projectfoo-git’, it goes like this:

$ cd <projectfoo-git directory>/..
$ git svn --authors-file=svn-authors.txt clone -s projectfoo-svn-git
$ cd projectfoo-git
$ git pull ../projectfoo-svn-git
$ git push

The remote repository will now contain the full SVN commit history merged into the existing history. Are there any other source control systems that can come anywhere near making it this easy? I doubt it.


Leave a Reply