代码之家  ›  专栏  ›  技术社区  ›  Zitrax dudico

svn到git转换

  •  14
  • Zitrax dudico  · 技术社区  · 16 年前

    我正在尝试将SourceForge项目从Subversion转换为Git。根据一些谷歌搜索,应该可以使用以下命令:

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

    在哪里? PROJECT 是sourceforge中的项目名称,用于将SVN项目签出到本地Git存储库中。

    但是,这只会给出以下错误消息:

    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
    

    我使用的是Kubuntu 8.10,Git是1.5.6.3版。

    我找到了一个 bug 关于Fedora的报道似乎很相似,但还没有解决,所以我不知道问题在哪里。我是否使用了错误的命令,或者它是一个bug?

    3 回复  |  直到 9 年前
        1
  •  16
  •   Cebjyre    16 年前

    从A svn project page 您似乎使用了错误的URL-请尝试:

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

    我刚刚成功地签出了一个(在OS X 10.5上使用Git 1.6.2),使用:

    git svn clone http://javaautoupdater.svn.sourceforge.net/svnroot/javaautoupdater ok.git
    
        2
  •  0
  •   user331536    14 年前

    我也遇到了同样的问题,结果发现我刚重新启动,需要ssh重新添加我的密钥。尝试在Gitsvn试图连接的框中使用ssh,看看会出现什么错误。

        3
  •  0
  •   trusktr    12 年前

    尝试使用名为svn2git的工具。请阅读此处了解详细信息: https://help.github.com/articles/importing-from-subversion .