问题解决:Git报错 GH001: Large files detected. You may want to try Git Large File Storage. 文件>100MB

本文详细描述了在Git仓库中提交超过100MB文件时遇到的错误信息及解决方案,通过使用git filter-branch命令,有效移除超大文件,避免影响仓库同步。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、问题描述 (Describe)

当你的Git仓库中不小心有一个超过100MB的文件,并且你不小心Commit后,会出现如下报错

remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: cc5b9de7356152c0194da63d929b1c66
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Weka/dataset-bug-classification/mozilla_firefox.csv is 118.64 MB; this exceeds GitHub's file size limit of 100.00 MB

在这里插入图片描述

二、解决方法(Solution)

使用如下 git 命令
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch Weka/dataset-bug-classification/mozilla_firefox.csv'
在这里插入图片描述
在这里插入图片描述

三、参考资料(Reference)

[1] Fixing the “GH001: Large files detected. You may want to try Git Large File Storage.”
[2] Git error, need to remove large file
[3] Git 上传单个文件超过100M的解决办法

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

捡起一束光

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值