Is it possible to convert the SVN branch to a new repo?

Our organization never used Trunk and just created new SVN branches for each version. Is it possible to just pick the most recent branch and create a new Git repository of that branch (with history)?

+3


source to share


1 answer


Yes, you can just clone just one branch from the SVN repo:

git svn clone http://svn.example.com/project/mostRecentBranch

      



This will create a git repository with one branch representing the "mostRecentBranch" history from the SVN repo.

git svn

will also include the history since the branch was created (ie the history of the branch from which "mostRecentBranch" was copied / created). However, this may not work if the branch was not created properly in SVN (ie, if it was not created using "svn copy").

+1


source







All Articles