問題
push的時候遇到以下問題:
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: f5b4ccf3739dd628391d2d522f1b1baf
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File object-detection/model/resnet50_coco_best_v2.0.1.h5 is 145.59 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File object-detection/model/yolo.h5 is 237.17 MB; this exceeds GitHub's file size limit of 100.00 MB
說的很清楚有兩個文件超出了100M的限制。
解決
使用Git LFS
- 在官網 https://git-lfs.github.com/ 下載git-lfs-windows-v2.8.0.exe並安裝。
- 新開一個bash命令行輸入
git lfs install
安裝 - 跟蹤你要push的大文件
git lfs track "*.h5"
,這時會生成一個.gitattributes文件。 - 這里很重要,一定要先將上一步生成的.gitattributes文件上傳到倉庫也就是要上傳三部曲
git add .gitattributes
git commit -m "add .gitattributes"
git push origin master
這時候就可以開始上傳你的大文件了。
參考
https://www.cnblogs.com/guxin/p/github-cannot-push-files-larger-than-100mb.html
https://blog.csdn.net/tyro_java/article/details/53440666