关于mac系统
一、解决git push/git clone代码速度太慢:
1.使用管理员权限打开hosts文件
sudo vim /etc/hosts
2.在该文件末尾空一行填入

修改之后速度由10k20k左右增到500k-1000k左右
二、检出大项目报错,curl的postBuffer默认值太小:
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
如果项目比较复杂庞大,检出会出现这个错误,就是因为curl的postBuffer默认值太小的原因,重新在终端配置一下这个值就可以:
git config --global http.postBuffer 524288000 (这个值是kb 500M,根据具体项目大小修改)
然后检查一下是否配置成功:
git config --list
最后
以上就是简单画板最近收集整理的关于解决mac系统git push/git clone代码速度太慢问题的全部内容,更多相关解决mac系统git内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复