簡體   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