Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert my SVN repository to Git while preserving branches?

Tags:

git

svn

Some help please. This doesn't seem to do it for me:

git svn clone --stdlayout --authors-file=../authors.txt file:///home/path
like image 783
Alexander Avatar asked Dec 21 '25 07:12

Alexander


2 Answers

The simplest way is to use svn2git, a ruby script that handles all of that for you. I've used it over the past 8 months or so to convert several quite large subversion repos to git; it's by far the best tool I've found for the job.

like image 153
ebneter Avatar answered Dec 23 '25 20:12

ebneter


There's a pretty thorough set of instructions available here, including how to convert SVN "tags" and "branches" into actual Git tags and branches.

like image 43
mipadi Avatar answered Dec 23 '25 19:12

mipadi