勿忘初心做自己 发表于 2024-10-14 20:32:22

git push报错remote: Please remove the file from history and try again

https://i-blog.csdnimg.cn/blog_migrate/1a264bcc1601251dba0f8b223ed7c342.png
原因:上传文件凌驾100M,找到此文件删除即可。
1、查看是哪个文件过大,此处对用红框里面的 a6de1336c67c3bac77757c5eff8c8001823f7c92,得到具体的文件名称
git rev-list --objects --all | grep a6de1336c67c3bac77757c5eff8c8001823f7c92 https://i-blog.csdnimg.cn/blog_migrate/24874a03726ac8ca7f00982b8401a4c1.png
2、删除过大的文件:文件名称从1中得到,此处为data/222.glb
git filter-branch --tree-filter 'rm -f data/222.glb' HEAD 最后出现Ref 'refs/heads/master' was rewritten则表示删除乐成
https://i-blog.csdnimg.cn/blog_migrate/5a068963c4420c15effa5ff0feb11b82.png
3、重新push
git push

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: git push报错remote: Please remove the file from history and try again