简体   繁体   English

如何将大型SVN存储库转换为Git?

[英]How can I convert a large SVN repo to Git?

I'm trying to convert several SVN repositories to Git. 我正在尝试将几个SVN存储库转换为Git。 Two have gone smoothly. 两个进展顺利。 When I try to convert the next, large-ish one, I get errors from git svn clone . 当我尝试转换下一个较大的版本时,我从git svn clone收到错误。 First a bunch of: 首先是:

W: Refspec glob conflict (ref: refs/remotes/origin/tags/Something-Perl):
expected path: something/trunk/tags/Something-Perl
    real path: something/tags/Something-Perl

for various "something." 对于各种“东西”。 Then one: 然后一个:

Initializing parent: refs/remotes/origin/TheName@27584
Use of uninitialized value $args[1] in join or string at /usr/share/perl5/vendor_perl/Git.pm line 1635.
Use of uninitialized value $_[2] in exec at /usr/share/perl5/vendor_perl/Git.pm line 1661.
fatal: Not a valid object name
ls-tree -z  ./: command returned error: 128

Digging, I find line 1635 is 挖,我发现1635行是

return wantarray ? ($fh, join(' ', $cmd, @args)) : $fh;

Google found a few instances of errors in Git.pm or SVN.pm but not this one. Google在Git.pmSVN.pm发现了一些错误实例,但没有发现此实例。 (For reference, I'm using git version 2.19.1 on Linux.) (作为参考,我在Linux上使用git版本2.19.1。)

I really only want two of the directories in that repo so I tried to follow Migrating a large SVN repo to git but I end up with an empty Git repo: 我真的只想要该存储库中的两个目录,所以我尝试遵循将大型SVN存储库迁移到git的操作,但最终得到一个空的Git存储库:

[MyNewRepo]$ git status
On branch master

No commits yet

nothing to commit (create/copy files and use "git add" to track)

Any thoughts? 有什么想法吗?

If you are only exporting to git you are better of using the KDE svn2git. 如果仅导出到git,则最好使用KDE svn2git。 It's much faster and allows you to create annotated tags. 它更快,并且允许您创建带注释的标签。 https://github.com/svn-all-fast-export/svn2git https://github.com/svn-all-fast-export/svn2git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM