gitee上传大于100M的文件

847 阅读1分钟

1、初始化git

test$ git init

2、查看git配置

test$ git config -l
credential.helper=osxkeychain
user.name=xxx
user.password=xxxx
user.email=xxx@qq.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true

3、设置上传文件的大小

52428000=500×1024×1024,即500M

test$ git config http.postBuffer 52428000

4、查看配置后的内容

test$ git config -l
credential.helper=osxkeychain
user.name=xxx
user.password=xxxx
user.email=xxx@qq.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
http.postbuffer=524288000

之后就可以上传超过100M的文件了。