我已经使用 cvs2git (cvs2svn) 迁移了一个旧的 cvs 存储库。结果转储文件现在有 72GB 大,我尝试通过 git fast-import 导入转储总是失败,因为内存不足错误:
fatal: Out of memory, malloc failed (tried to allocate 6196691 bytes)
fast-import: dumping crash report to fast_import_crash_13097
error: git-fast-import died of signal 11
因此我的系统有 32GB RAM 和 50GB 交换空间。我在带有 Git 1.8.3.4(gcc44、python2.6.8、cvs2svn2.4.0)的 Red Hat 5.3 上运行导入。我也尝试过取消限制堆栈大小和文件描述符,但内存错误仍然存在。
有人知道吗?
最佳答案
想法是:
- split the cvs repo (每个 repo 应该代表一个“coherent component”)
- 清理它的内容(任何可以重新生成的大二进制文件,或者存储在工件引用中的其他地方,应该被排除在 cvs 仓库之外),因为 git doesn't deal well with large files .
然后您将 cvs(子)库导入到单独的 git 库中。
由于 git 是分布式的,而不是集中式的,因此您希望保持每个 git 存储库的大小合理。
关于git - 如何将 72GB 的转储文件导入 git?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18172876/