GH001: Large files detected. You may want to try Git Large File Storage

liangchaojie@192 JieAnnotation % git push -f -u origin master

运行之后报错如下,原因是某个文件超过了100M


Enumerating objects: 90, done.
Counting objects: 100% (90/90), done.
Delta compression using up to 12 threads
Compressing objects: 100% (61/61), done.
Writing objects: 100% (90/90), 136.56 MiB | 35.07 MiB/s, done.
Total 90 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 1f974bccfc6623a80221e5b3688c3515e8f60aced8d1a114431c149ef2737b52
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File gradle/wrapper/gradle-6.5-all.zip is 139.01 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/liangchaojie/JieAnnotation.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/liangchaojie/JieAnnotation.git'

如何解决? 删除掉这个大文件再提交即可

liangchaojie@192 JieAnnotation % git filter-branch --tree-filter 'rm -rf gradle/wrapper/gradle-6.5-all.zip' HEAD
Rewrite 7e5588723d28d1169c3a2740993826ff73b7770d (2/2) (0 seconds passed, remaining 0 predicted)    
Ref 'refs/heads/main' was rewritten
liangchaojie@192 JieAnnotation % git push -f --set-upstream origin main
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值