繁体   English   中英

将具有大文件的svn存储库迁移到新的git存储库?

[英]Migrate an svn repo with large files to a new git repo?

我已经将文件大于100 mb的svn repo转换为带有git-svn的git repo。 一切都顺利进行。 然后,我尝试将存储库上传到GitHub,但出现一个错误,即文件太大。 我按了git lfs的链接,我毫不费力地进行了设置。 我为.gitattributes部分分配了太大的文件扩展名,在上载期间,一切似乎都正常运行。 git lfs上传了大文件,然后git上传了其余文件-但是同一文件仍然存在相同的错误! 所以我在寻找这个文件,但是在仓库中找不到它。 我认为它必须在较早的提交中进行,然后再删除。 我想我可以删除跟踪的大文件,但这将在编辑历史记录。 上载回购协议时,lfs是否可以跟踪先前提交中的文件? 还是发生了其他事情? 这是我的控制台输出:

➜  automated_design git:(master) git push -u origin master
Uploading LFS objects: 100% (134/134), 216 MB | 6.0 MB/s, done                  
Counting objects: 44692, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7171/7171), done.
Writing objects: 100% (44692/44692), 1.75 GiB | 4.79 MiB/s, done.
Total 44692 (delta 37828), reused 44158 (delta 37460)
remote: Resolving deltas: 100% (37828/37828), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 247de6add2c0943c33f0d5b1e57c8155
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Final Designs/ADT Designs/EtFlocSedFi/EtFlocSedFi Spanish 2.rtf is 101.13 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/AguaClara/mathcad.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/AguaClara/mathcad.git'
➜  automated_design git:(master) cat .gitattributes 
*.psd filter=lfs diff=lfs merge=lfs -text
*.docx filter=lfs diff=lfs merge=lfs -text
*.dwg filter=lfs diff=lfs merge=lfs -text
*.rtf filter=lfs diff=lfs merge=lfs -text
➜  automated_design git:(master) 

任何帮助深表感谢!!

我最终使用BFG Repo-Cleaner清除了先前提交中的所有大文件。 效果很好。 然后我推送了仓库,没有更多错误了。

暂无
暂无

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

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