简体   繁体   English

从SVN迁移到具有大历史的Git

[英]Migrating from SVN to Git with large history

I'm trying to migrate a large project from SVN to Git. 我正在尝试将一个大型项目从SVN迁移到Git。 It's a +15 years old project and it has a large history. 这是一个+ 15年的项目,它有着悠久的历史。 We are using the svn2git Ruby tool, but can't push to the repo because the history file is +1GB, therefore get an error message. 我们正在使用svn2git Ruby工具,但由于历史文件为+ 1GB,因此无法推送到repo,因此会收到错误消息。

Is it possible to enable LFS support to the history files, or any other way to keep the history? 是否可以对历史文件启用LFS支持,或以其他任何方式保留历史记录?

Also, is there a way to migrate only the last 4 branches and 4 tags, instead of all the branches and tags? 另外,有没有办法只迁移最后4个分支和4个标签,而不是所有的分支和标签?

There are plenty tools called svn2git , but from your question I see you are not using the KDE one from https://github.com/svn-all-fast-export/svn2git . 有很多工具叫做svn2git ,但是从你的问题我看到你没有使用https://github.com/svn-all-fast-export/svn2git中的KDE。 I strongly recommend using that svn2git tool. 我强烈建议使用该svn2git工具。 It is the best I know available out there and it is very flexible in what you can do with its rules files. 这是我所知道的最好的,它可以非常灵活地使用它的规则文件。

You will easily be able to configure it for your layout to get the result you want and expect. 您可以轻松地为布局配置它以获得您想要和期望的结果。

Also just porting specific branches is easy as pie by configuring the branches you want explicitly and use a catch-all for the rest that does not forward to a repository. 通过明确配置您想要的分支,只需移植特定分支也很容易,并且对于不转发到存储库的其余分支使用catch-all。

If you are not 100% about the history of your repository, svneverever from http://blog.hartwork.org/?p=763 is a great tool to investigate the history of a SVN repository when migrating it to Git. 如果您不是100%关于存储库的历史记录, svneverever http://blog.hartwork.org/?p=763中的svneverever是一个很好的工具,用于在将SVN存储库迁移到Git时调查它的历史记录。

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

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