简体   繁体   English

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

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

I have converted my svn repo, with files larger than 100 mb, into a git repo with git-svn. 我已经将文件大于100 mb的svn repo转换为带有git-svn的git repo。 Everything went swimmingly. 一切都顺利进行。 Then I attempted to upload the repo to GitHub, and I got an error that a file was too large. 然后,我尝试将存储库上传到GitHub,但出现一个错误,即文件太大。 I followed the link to git lfs , I set it up without a hitch. 我按了git lfs的链接,我毫不费力地进行了设置。 I assigned the file extensions of the files that were too large to the .gitattributes section, and during my upload, everything seemed to work well. 我为.gitattributes部分分配了太大的文件扩展名,在上载期间,一切似乎都正常运行。 git lfs uploaded the large files, and then git uploaded the rest - but there was still the same error from the same file! git lfs上传了大文件,然后git上传了其余文件-但是同一文件仍然存在相同的错误! So I looked for this file, and I couldn't find it within the repo. 所以我在寻找这个文件,但是在仓库中找不到它。 I think it must have been made in an earlier commit, and later deleted. 我认为它必须在较早的提交中进行,然后再删除。 I suppose I could delete the tracked, large file, but that would be editing the history. 我想我可以删除跟踪的大文件,但这将在编辑历史记录。 Is there any way for lfs to track files in previous commits when uploading a repo? 上载回购协议时,lfs是否可以跟踪先前提交中的文件? Or is something else going on? 还是发生了其他事情? Here's my console output: 这是我的控制台输出:

➜  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) 

Any help is much appreciated!! 任何帮助深表感谢!!

I ended up using BFG Repo-Cleaner to clean all the large files out of my previous commits. 我最终使用BFG Repo-Cleaner清除了先前提交中的所有大文件。 It worked very well. 效果很好。 Then I pushed the repo and no more error. 然后我推送了仓库,没有更多错误了。

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

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