Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (15 sloc) 1.23 KB


This is a script to migrate a Git repository to SVN preserving the commits history. This is not something that people will use a lot, but in case you need to do something like this (like I did – don’t ask me why), you might want to use this script.

If you don’t need to preserve your history, there’s a good guide on Google Code explaining how to migrate in a simpler way.


1) Clone your Git repository and checkout your SVN repository:

$ git clone git:// git_repo
$ svn checkout svn_repo

2) Configure variables (GIT_DIR and SVN_DIR) with locations of both repositories.

3) Run the script from anywhere except one of these two directories.


If you want to see an example migration, check the following repositories:


Be careful

This script will delete everything from your SVN repository when the first commit is migrated.

Something went wrong with that request. Please try again.