[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,回车。

相关推荐
Change!!17 小时前
git小乌龟,切换到新分支处理
git·git切到新分支,旧代码贮藏
LannyChung1 天前
PowerShell 下 git log 中文乱码的完整排查与解决
windows·git
import_random1 天前
[git]本地main,origin/main,远程main(关系2)
git
golang学习记1 天前
Zed Git重大更新:目录级对比支持分栏Diff
git·vscode·zed
阿俊-全栈开发2 天前
LikeShop 单商户高级版二开项目的 Git 分支管理与版本发布规范
git·likeshop·likeshop开源商城·likeshop多商户
努力弹琴的大风天2 天前
TortoiseGit 仓库不显示绿色对号解决方案
git·tortoisegit·图标显示
我不会插花弄玉2 天前
GitHub实操【由浅入深-Git】
git·github
说实话起个名字真难啊2 天前
Git常用小问题笔记
笔记·git·elasticsearch
橙露2 天前
git简明教程以及资源分享
大数据·git
codigger3 天前
别再靠"最终版-改"活下去了:一篇讲透 Git 与 GitHub
git·程序员·github·编程·控制版本