I have this error while pushing my project to tfs GIT.
fatal: Out of memory, malloc failed (tried to allocate 889192448 bytes)
I fixed this by decreasing the postbuffer size:
postbuffer
[http] postbuffer = 5m