解决git push大小限制

Symptoms

When users try to run “git push” the following error message is shown:

1
2
3
4
5
6
7
8
9
$ git push
Counting objects: 2332669, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (360818/360818), done.
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
Writing objects: 100% (2332669/2332669), 483.30 MiB | 114.26 MiB/s, done.
Total 2332669 (delta 1949888), reused 2330461 (delta 1949349)
fatal: The remote end hung up unexpectedly

Resolution

Increase the Git buffer size to the largest individual file size of your repo:

git config --global http.postBuffer 157286400

Donate? comment?