网络编程 
首页 > 网络编程 > 浏览文章

解决git误commit大文件导致不能push问题

(编辑:jimmy 日期: 2024/9/20 浏览:3 次 )

git push时终端报错:

error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
fatal: The remote end hung up unexpectedly

你已经把大文件写入本地.git历史中。
你需要把它从commit历史,以及.git库里移除掉。
可以使用git filter-branch --tree-filter 'rm -f 文件名' HEAD命令

解决git误commit大文件导致不能push问题

参考:https://git-scm.com/book/zh/v1/Git-工具-重写历史#核弹级选项:-filter-branch

总结

上一篇:浅析git 删除某次指定的提交问题
下一篇:解决使用commit提交大文件无法推送到远程库问题及git rebase使用详解
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap