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.
Join the DZone community and get the full member experience.Join For Free
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
svnserve -d –foreground -rin 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.
Published at DZone with permission of Alan Richardson, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.