git报错the remote end hung up unexpectedly

2025-04-12 22:31:03

1、我们在使用git命令push代码的时候,会提示“the remote end hung up unexpectedly”,如图所示。

git报错the remote end hung up unexpectedly

2、造成的原因就是推送代码的大小超出了git默认的范围,可以调整git扦拖匆敉推送代码的最大值,找到项目中的.git文件夹,如图所示。

git报错the remote end hung up unexpectedly

3、如果找不到,可以点击该项目所在文件夹上面的“查看”,如图所示。

git报错the remote end hung up unexpectedly

4、然后把“隐藏的项目”前面的复选框勾选上,就可以看到隐藏的文件了,如图所示。

git报错the remote end hung up unexpectedly

5、找到.git文件夹之后,点击进入,找到其中的“config”文件,也就是git的配置文件,如图所示。

git报错the remote end hung up unexpectedly

6、然后在打开config配置文件,在最底下增加如下的配置:[http]postBuffer = 524288000如图所示。

git报错the remote end hung up unexpectedly

7、此时重新执行git push命令,代码就可以成功的推送到代码仓库,如图所示。

git报错the remote end hung up unexpectedly

8、以上就是git报错the remote end hung up unexpectedly的解决办法,希望可以帮到大家。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢