提交git,文件大于100M 限制的解决措施

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'

**上面提到Git Large File Storage(https://git-lfs.github.com/).直接访问有 github 开源的 LFS 大文件上传方法就可以解决;
具体方式下面贴出来,也给自己备注下

$ cd 项目工程文件夹
$ git lfs install
$ git lfs track "*.psd"//这里表示添加后缀为 psd 的文件,按照自己的项目替换相应的文件
$ git add .gitattributes
//好了,上面三条命令已为我们成功添加了大文件 lfs仓库; 下面是正常的git提交操作
$ git add .
$ git commit -m "添加.gitattributes文件"
$ git push origin master

备注:如果执行生面方式有失败的情况,可能是之前有提交过,清除下提交缓存

$ git rm -r --cached .

然后从新正常git提交操作


2279162-a07d8aa4e0f5484e.png
image.png

猜你喜欢

转载自blog.csdn.net/weixin_34198881/article/details/87037174
今日推荐