git无法push大文件:this exceeds GitHub‘s file size limit of 100.00 MB

报错问题

remote: Resolving deltas: 100% (16/16), completed with 1 local object.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: cd56401cea0e1e976a7eb6c551f09a61ccb0049647444277bc884b1ba8320e6e
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File xxx is 104.50 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/xxx.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/xxx.git'

使用git lfs

移除大文件的影响

# 以下执行完,应该能正常的push。确保之前执行的错误不会对后续产生影响
git rm --cached path_of_a_giant_file
git commit --amend
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch path_of_your_bigfile'
git push


mac 安装
brew install git-lfs
git lfs
cd your_git_dir

git lfs install
git lfs track  yourbigfile
git add yourbigfile
git commit -m "add bigfile"
git push origin master

问题,结果上传超时Orz

LFS: Put "https://github-cloud.s3.amazonaws.com/alambic/media/319041240/fb/60/fb60b1c58a22262b3184479833d3cc540ff8783f274b73492d5d?actor_id=11&key_id=22&repo_id=33": dial tcp 54.231.34.41:443: i/o timeout

参考文件

  • https://docs.github.com/en/free-pro-team@latest/github/managing-large-files/distributing-large-binaries
  • https://docs.github.com/en/free-pro-team@latest/github/managing-large-files/removing-files-from-a-repositorys-history
  • https://github.com/git-lfs/git-lfs/issues/1581
  • https://docs.github.com/en/free-pro-team@latest/github/managing-large-files/installing-git-large-file-storage
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值