Github 上传文件超过100M时报“this exceeds GitHub’s file size limit of 100 MB”错误的解决方法:
安装git-lfs:
bfg-1.12.5.jar下载链接:
https://jar-download.com/cache_jars/com.madgag/bfg/1.12.5/jar_files.zip
首先下载bfg这个工具,然后按照文档操作就行了,Removing sensitive data from a repository,先clone下来仓库,进入仓库然后执行下边命令:
// 强制清除侵权文件 java -jar ~/Desktop/bfg-1.14.0.jar --delete-files 'Docker - Up & Running.pdf' --no-blob-protection // 执行垃圾回收 git reflog expire --expire=now --all && git gc --prune=now --aggressive // 将数据推送到远端即可(需要关闭 GitHub 上仓库设置里面对强制推送的防护),Setting → Branches → Add rules → Allow force pushes git push -f origin master
参考: