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

相关推荐
爱学英语的程序员40 分钟前
Git 提交 LF will be replaced by CRLF the next time Git touches it 报错
git
qq_339191141 小时前
服务器git pull每次都要输入密码,linux 设置git登录,linux设置git只输入一次账户密码
git
一颗小行星!7 小时前
快速理解 Git submodule
git
A-Jie-Y10 小时前
Git基础-核心概念与常用命令
git
夜珀10 小时前
Git基础修炼手册:在AtomGit上玩转版本控制
git
golang学习记10 小时前
Zed IDE官宣新招:Git Graph 正式支持!
ide·git
要记得喝水11 小时前
适用于 Git Bash 的脚本,批量提交和推送多个仓库的修改
git·elasticsearch·bash
AI_Claude_code11 小时前
专栏导论:开源项目贡献的价值与Git工作流全景图
git·开源
never forget shyang11 小时前
CCS20.2.0使用教程
c语言·git·单片机
lifewange20 小时前
常用的Git命令有哪些?
git