将包含大文件的svn repo迁移到新的git仓库?

问题描述 投票:0回答:1

我已经将我的svn repo(大于100 mb的文件)转换为git-svn的git repo。一切都顺其自然。然后我尝试将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) 

任何帮助深表感谢!!

git github svn git-lfs
1个回答
0
投票

我最终使用BFG Repo-Cleaner清除了之前提交的所有大文件。它工作得很好。然后我推了回购,没有更多的错误。

© www.soinside.com 2019 - 2024. All rights reserved.