remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: a703cdcc9fade51f2a131142249cb422
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File ARCore/Data/resources.assets.resS is 130.82 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File ARCore/Libraries/libiPhone-lib.a is 463.62 MB; this exceeds GitHub's file size limit of 100.00 MB
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/***.git'
GitHub 无论是网页上传还是 git 上传的文件大小都不能大于 100MB,但是 GitHub 提供了上传大文件的解决办法:https://git-lfs.com/
我也尝试了网上的很多种方法,但一定要注意命令的执行顺序,不然依旧会提交失败。
git init
git remote add origin 仓库地址
lfs
git lfs install
lfs
后,需要使用 lfs
追踪你要上传的大文件(后缀名)git lfs track "*.sql"
.gitattributes
文件,一定要将这个文件一起 add
和 commite
以及 push
git add .gitattributes
git add acdc.sql
或者不需要分开添加,直接全部添加也行
git add .
git commit -m "big file"
push
到远程仓库就行了git push -u origin master