处理GitHub不允许上传大于100M文件问题

在使用git提交代码到GitHub时,遇到100M文件上传限制问题。可以通过删除大文件、修改最近commit或者使用BFG工具清理历史commit中大文件来解决。详细步骤包括:检查文件路径、git rm命令移除文件、git commit --amend,以及在历史commit中使用BFG工具清理大文件。注意命令执行的正确路径和文件大小限制。
摘要由CSDN通过智能技术生成

自己平常用git作为项目版本控制工具,在往代码托管仓库github提交代码时,由于自己的commit中包含了一个几百兆的字符串文件,git push失败,并报以下错误:

Counting objects: 33, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (33/33), done.
Writing objects: 100% (33/33), 82.14 MiB | 3.17 MiB/s, done.
Total 33 (delta 13), reused 0 (delta 0)
remote: Resolving deltas: 100% (13/13), completed with 6 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 521034d3abb4a142c2d2a6d9bcef7bd5
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File src/string/findMostPoem.txt is 490.51 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/my/my.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/my/my.git'

意思是有大文件,更多信息可到http://git.i

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值