How to push large size working copy into a git repository

While working with GIT I have encountered something I haven't dealt with in SVN.

I had a very big working copy with very big files (up to 1 GB of size). The total size of the working copy was 10 GB.

After long time investigating and trial and error, I have found out that GIT cannot handle big chunks of data to be pushed so I have tried to add/commit/push only half of the data and then only quarter and so on. Till I got to a point that I have tried to push one file with the size of 800 MB and couldn't.

The error message of both command line and using tortoise SVN on a windows machine was:

fatal: Out of memory, realloc failed 

While on linux machine the error message was:

PUT <SHA1> failed, aborting (22/500)


After some more googling I have found that there's a git client configuration that allows configurable size of chunks to be pushed to the remote repostory. This configuration is part of the .git/config file. Configuration is as follows:


     postBuffer = 629145600
The above sets the maximum size of a chunk to be pushed to 6 GB. After the above configuration I have managed to push my working copy in two chunks of 5 GB each.
DevOps Engineer

DevOps Group