[git] out of memory malloc failed

参考:

https://segmentfault.com/a/1190000042740954?utm_source=sf-similar-article

git上传代码时报错:

fatal: Out of memory, malloc failed (tried to allocate 524288000 bytes)

处理办法:

打开cmd,依次输入:

c 复制代码
git config --global pack.windowMemory 50m
git config --global http.postbuffer 524288000
git repack

或者修改本地的.gitconfig文件

c 复制代码
[http]
postbuffer = 524288000
[pack]
windowMemory = 50m

再在cmd中输入git repack,回车。

相关推荐
csdn_aspnet1 小时前
Git灾难级误操作抢救手册:从reset到reflog的终极救援
git·恢复·误删
2401_891655812 小时前
Git + 云原生:如何管理K8s配置版本?
git·云原生·kubernetes
m0_528174454 小时前
Git对象存储原理(blob/tree/commit) 引用日志(reflog)
大数据·git·elasticsearch·全文检索
无限进步_4 小时前
【C++】单词反转算法详解:原地操作与边界处理
java·开发语言·c++·git·算法·github·visual studio
Wzx1980127 小时前
Git分布式版本控制工具
git
whale fall19 小时前
git add、git commit、git push 的区别和联系
git
倾云鹤19 小时前
Git同时推送多个远程仓库
git
sdm0704271 天前
基础开发工具git,gdb
git
胡琦博客1 天前
如何同步远程分支到本地(远程有些分支已经删除了)
git
AI成长日志1 天前
【实用工具教程】Git进阶:分支策略与合并冲突解决
git