最近Github仓库push上传时报 LFS 超额被限制:batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
这玩意超过1G免费容量是要收费的,也能理解不然github仓库都能拿来当网盘使用了。这个仓库有2个多G大小,之前有些上传的pdf文件大小是超过50M,所以使用了LFS,需要删掉一些,打开github Settings → Billing and plans → Plans and usage,好家伙用了2.51G,清掉一些大的pdf就好啦。
1.git lfs uninstall
2.git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch python/book/Python Cookbook(第2版)中文版.pdf python/book/编写高质量代码-改善Python程序的91个建议.pdf program/book/Head First Programming 中文版.pdf program/book/SRE Google运维解密.pdf" \
--prune-empty --tag-name-filter cat -- --all
3.git push -f origin master
参考: