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

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

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

草珊瑚   2021-02-02 我要评论
想了解解决git误commit大文件导致不能push问题的相关内容吗,草珊瑚在本文为您仔细讲解git误commit大文件导致不能push的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:git误commit大文件导致不能push,git误commit大文件,下面大家一起来学习吧。

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命令

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

总结

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们