Exporting a git repository to subversion

Yeah, you read that right. That is probably the inverse of what most people want. But, anyway, let’s say you have a project originally hosted on a git repository and you need to export it to a subversion repository for some reason. Now what?

The nice folks of Google Code have put a really good step-by-step guide explaining how to do it. This guide was originally posted on Google Open Source Blog. In case you need another view on the process, you can follow the “git export to svn” discussion on nabble — which just get good at the very end.

There is a little gotcha on the guide — not an error, but something they should have stressed. The Subversion repository you will use must be non-empty. Again: the Subversion repository must be non-empty. Notice that by non-empty all they mean is that the subversion repository should have at least one revision commited to it, and not that it ought to have files in it. Got it? Good. Now move on.

Leave a Reply