博客园 首页 私信博主 显示目录 隐藏目录 管理

git clone报错处理

git clone过大的仓库时会报以下错误

remote: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header

解决办法是分层clone

$ git clone --depth 1 https://github.com/dogescript...
$ git remote set-branches origin 'remote_branch_name'
$ git fetch --depth 1 origin remote_branch_name
$ git checkout remote_branch_name
posted @ 2021-01-25 14:58  MrSharp  阅读(1893)  评论(0)    收藏  举报