GitHub上传文件不能超过100M的解决办法
2021-05-19 本文已影响0人
纵昂
上传项目到GitHub上,当某个文件大小超过100M时,就会上传失败,因为默认的限制了上传文件大小不能超过100M。如果需要上传超过100M的文件,就需要我们自己去修改配置。
一、首先,打开终端,输入命令
调整postbuffer为500M, 再次提交
git config --global http.postBuffer 524288000
如下图操作:


执行完以上语句后输入:
git config -l
可以看到配置项的最下面多出了一行我们刚刚配置的内容.(52428000=500×1024×1024,即500M)
附:解决git clone 速度慢的问题
使用国内镜像,目前已知Github国内镜像网站有github.com.cnpmjs.org和git.sdut.me/。速度根据各地情况而定,在clone某个项目的时候将github.com替换为github.com.cnpmjs.org即可
一、使用国内镜像,目前已知Github国内镜像网站有github.com.cnpmjs.org和git.sdut.me/。速度根据各地情况而定,在clone某个项目的时候将github.com替换为github.com.cnpmjs.org即可
//例如这是我们要clone的代码
https://github.com/ZongAng123/SystemMap-iOS
使用镜像
//在https://github.com后面跟.cnpmjs.org即可
https://github.com.cnpmjs.org/ZongAng123/SystemMap-iOS
亲测实用,非常滴快!!!!