git报错the remote end hung up unexpectedly

时间:2024-10-13 11:08:32

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的解决办法,希望可以帮到大家。

© 2025 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com