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

一、问题描述 (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

发布了311 篇原创文章 · 获赞 164 · 访问量 17万+

猜你喜欢

转载自blog.csdn.net/qq_43827595/article/details/105673569