公司服务器要更换,Unity 项目一个项目大小在7-20G,git push推送到远程服务器的时候抱错

git.exe push --progress "origin" Client
Enumerating objects: 4445, done.
Counting objects: 100% (4445/4445), done.
Delta compression using up to 16 threads
fatal: Out of memory, malloc failed (tried to allocate 183850932 bytes)
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
error: failed to push some refs to 'http://192.168.x.x:8080/scm/repo/gaolu/Liferaftproject'

打开git bash here依次敲下一下代码

git config --global pack.threads 1 git

git config --global pack.deltaCacheSize 128m

git config --global pack.windowMemory 50m

git push

这样就OK了

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐