Table of Contents
31 Subversion Migration
If you have an existing codebase in another VCS but you’ve decided to start using Git, you must migrate your project one way or another. Here are some details and guides:
-
Git Book: Git and Other Systems - Migrating to Git
-
GitHub: Subversion to Git Migration
-
Atlassian: Migrate to Git from Svn
svn2git
svn2git is a tiny utility for migrating projects from Subversion to Git while keeping the trunk, branches and tags where they should be. It uses git-svn to clone an svn repository and does some clean-up to make sure branches and tags are imported in a meaningful way, and that the code checked into master ends up being what's currently in your svn trunk rather than whichever svn branch your last commit was in.
It can be found at https://github.com/nirvdrum/svn2git.
Installation
Make sure you have git, git-svn, and ruby installed. svn2git is a ruby wrapper around git's native SVN support through git-svn. It is possible to have git installed without git-svn installed, so please do verify that you can run $ git svn
successfully.
1. Git
2. Ruby
-
install MSYS2 base installation
-
reboot computer!
3. svn2git
Once you have the necessary software on your system, you can install svn2git through rubygems, which will add the svn2git command to your PATH.
$ gem install svn2git