报错的主要内容是:RPC failed; result=22, HTTP code = 411; 原先以为是BAE上传文件大小有限制,最后查明导致该错误是因为默认 Git 设置 http post 的缓存为 1MB,只需要将其设置为更大值即可;

以下是报错内容

Counting objects: 172, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (159/159), done.
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
Writing objects: 100% (171/171), 1.62 MiB | 2.06 MiB/s, done.
Total 171 (delta 35), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date

解决方法(在命令行执行)

git config http.postBuffer 524288000