【问题标题】:Migrate an svn repo with large files to a new git repo?将带有大文件的 svn 存储库迁移到新的 git 存储库?
【发布时间】:2018-08-28 17:41:38
【问题描述】:

我已将文件大于 100 mb 的 svn 存储库转换为带有 git-svn 的 git 存储库。一切都很顺利。然后我尝试将 repo 上传到 GitHub,我收到一个文件太大的错误。我点击了git lfs 的链接,我顺利地设置了它。我将太大的文件的文件扩展名分配给 .gitattributes 部分,在我上传期间,一切似乎都运行良好。 git lfs 上传了大文件,然后 git 上传了其余文件 - 但同一个文件仍然存在相同的错误!所以我找了这个文件,但我在 repo 中找不到它。我认为它一定是在较早的提交中进行的,后来又被删除了。我想我可以删除跟踪的大文件,但这将是编辑历史记录。上传 repo 时,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】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-06
      • 1970-01-01
      相关资源
      最近更新 更多