Git push over HTTPS with large changesets

You may encounter the following error when pushing large changesets with Git over HTTPS:

Counting objects: 6248, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2032/2032), done.
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
Writing objects: 100% (6248/6248), 407.25 MiB | 248.95 MiB/s, done.
Total 6248 (delta 3638), reused 5611 (delta 3162)
fatal: The remote end hung up unexpectedly

You can fix this by increasing your git configuration for postBuffer from default 1MB to 500MB.

git config --global http.postBuffer 524288000

Feedback and Knowledge Base