美文网首页
如果因为项目过大,clone失败怎么办

如果因为项目过大,clone失败怎么办

作者: 今年27 | 来源:发表于2022-10-24 10:32 被阅读0次

1,可以考虑增加缓存

git config --global http.postBuffer 2048M
git config --global http.maxRequestBuffer 1024M
git config --global core.compression 9

git config --global ssh.postBuffer 2048M
git config --global ssh.maxRequestBuffer 1024M

git config --global pack.windowMemory 256m 
git config --global pack.packSizeLimit 256m

2,如果还不行可以考虑只先clone一部分git历史记录

1. git clone --depth 1 //FORKLOCATION
2.git fetch --unshallow

之后可以通过

$ git remote set-branches origin 'remote_branch_name'
$ git fetch --depth 1 origin remote_branch_name
$ git checkout remote_branch_name

来切换远程分支
参考文档
https://blog.csdn.net/qq_43827595/article/details/104833980

相关文章

网友评论

      本文标题:如果因为项目过大,clone失败怎么办

      本文链接:https://www.haomeiwen.com/subject/qatgzrtx.html