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

相关推荐
wdfk_prog5 小时前
实战教程:从“对象文件为空“到仓库重生——修复 Git 仓库损坏全记录
大数据·网络·笔记·git·学习·elasticsearch·全文检索
ALex_zry7 小时前
Git Status 命令深度指南:洞悉仓库状态的核心艺术
大数据·git·elasticsearch
啃火龙果的兔子8 小时前
如何在 VS Code 中进行 `cherry-pick`
git
夜里慢慢行4568 小时前
git工程多个remote 拉取推送
git
啃火龙果的兔子11 小时前
Git `cherry-pick` 工具汇总
git
ALex_zry17 小时前
Git 乱码文件处理全流程指南:从识别到彻底清除
git·elasticsearch·搜索引擎
李梦晓17 小时前
git 提交代码到别的分支
前端·git
思绪漂移19 小时前
更改CodeBuddy的默认terminal为Git Bash
git·bash·terminal·codebuddy
一世暖阳79320 小时前
git创建独立分支并上传远程仓库
git
《小书生》1 天前
git stash 暂存文档
git