Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Convert SVN to Git [Video]

DZone's Guide to

How to Convert SVN to Git [Video]

If you are still using SVN but want to make the move to everyone's favorite versioning format, wait no more.

· Open Source Zone ·
Free Resource

I hit every error possible when converting SVN to GIT. I eventually figured out the simplest way to avoid errors during the conversion process.

Migrate SVN to Git from Local File Repositories

To migrate from SVN to GIT I found it most reliable to use a local svn server, having migrated from remote svn using an svn dump file, then using svnserve to allow conversion using git svn over the svn protocol.

  • Have a local SVN server; I’ve been using Visual SVN Server
  • I migrated remote SVN repos via a dump file http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.dump.html
  • Imported the dump file into Visual SVN
  • Running svnserve -d –foreground -r in the foot folder containing the svn repos
  • Then I can use git svn to clone the repo with the svn protocol
git svn clone svn://127.0.0.1/my-repo -s


  • Then I can add a remote server and push it to my local repo
    •  git remote add origin  
    •  git push origin master -u 

This avoids all errors like CPAN Core, SVN file format versions above 1.6, malformed XML over HTTP, and slow http connections.

This just works.



Topics:
svn ,git ,convert ,repository ,open source

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}