0%

Git推送大文件出现错误

错误提示

1
2
3
4
5
6
Enumerating objects: 4097, done.
Counting objects: 100% (4097/4097), done.
Delta compression using up to 4 threads
Compressing objects: 100% (764/764), done.
client_loop: send disconnect: Connection reset by peer/s
fatal: the remote end hung up unexpectedly | 42.00 KiB/s

错误原因

GitHub默认无法提交超过100M的文件

解决方案

将 Git 缓冲区大小增加到 repo 的最大单个文件大小

1
git config --global http.postBuffer 157286400