赞
踩
git commit 之后才发现忘了把一个很大的jar包删掉,git push错误提示如下:
remote: error: File: 35eb36918ab68c6433d5b3eae55a53b6bc5f7a5a 851.36 MB, exceeds 100.00 MB.
remote: Use command below to see the filename:
remote: git rev-list --objects --all | grep 35eb36918ab68c6433d5b3eae55a53b6bc5f7a5a
remote: Please remove the file from history and try again. (https://gitee.com/help/articles/4232)
1、按提示找出文件名,以下命令一定要在git命令窗口进行
$ git rev-list --objects --all | grep 35eb36918ab68c6433d5b3eae55a53b6bc5f7a5a
3afd05f7bcf48117d75d848dcc04f9e9a0caeca5 docker/ruoyi/modules/ams/jar/ams.jar
找出文件名 docker/ruoyi/modules/ams/jar/ams.jar
2、在git中去除此文件
$ git filter-branch --force --index-filter "git rm --cached --ignore-unmatch docker/ruoyi/modules/ams/jar/ams.jar" --prune-empty --tag-name-filter cat -- --all
操作完成后,需要重新add提交一下文件
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。