Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn to git conversion

I am trying to convert a SourceForge project from Subversion to Git. According to some Googling, it should be possible to use this command:

git svn clone http://PROJECT.svn.sourceforge.net/ PROJECT.git

Where PROJECT is the project name at SourceForge, to get a SVN project checked out into a local git repository.

However this just gives the following error message:

Initialized empty Git repository in /home/user/git/PROJECT.git/.git/
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/SVN/Core.pm line 584.
XML data was not well-formed:  at /usr/bin/git-svn line 1385

I am using Kubuntu 8.10 and Git is version 1.5.6.3.

I found a bug reported on Fedora that seem to be similar, but it has not been resolved, so I do not know where the problem is. Am I using the command incorrectly, or is it a bug?

like image 795
Zitrax Avatar asked Mar 10 '09 23:03

Zitrax


People also ask

Can you convert SVN to Git?

The high-level workflow for migrating from SVN to Git is as follows: Prepare a migration environment. Convert the source SVN repository to a local Git repository. (Optional) Synchronize the local Git repository with any changes from SVN repository while developers continue using SVN.

Which popular tool can be used to move SVN to Git?

There are many tools such as svn2git available to perform the migration, in this tutorial we will focus on git-svn utility: a Git extension , which can be used to check out a Subversion repository to a local Git repository and then push changes from the local Git repository back to the Subversion repository.

What does Git SVN clone do?

The git svn clone command transforms the trunk, branches, and tags in your SVN repository into a new Git repository. Depending on the structure of your SVN repo, the command needs to be configured differently.


1 Answers

From a svn project page it looks like you are using the wrong URL - try:

git svn clone http://PROJECT.svn.sourceforge.net/svnroot/PROJECT PROJECT.git

I just successfully checked one out (with git 1.6.2 on OS X 10.5) with:

git svn clone http://javaautoupdater.svn.sourceforge.net/svnroot/javaautoupdater ok.git
like image 188
Cebjyre Avatar answered Sep 21 '22 20:09

Cebjyre