bigsan
1/17/2010 - 8:00 AM

Git: migrate from svn to git

Git: migrate from svn to git

# source: http://www.jonmaddox.com/2008/03/05/cleanly-migrate-your-subversion-repository-to-a-git-repository/

mkdir my_blog_tmp
cd my_blog_tmp

# --no-metadata, tells GIT to leave all the SVN details behind (not the commit log)
git-svn init http://code.yoursite.net/my_blog/trunk/ --no-metadata

# remap all the SVN users to GIT users when it sucks down the source and history
git config svn.authorsfile ~/Desktop/users.txt
git-svn fetch

# leaving behind all the SVN cruft that was there to support the git-svn stuff
git clone my_blog_tmp my_blog