Git 克隆仓库失败(remote: aborting due to possible repository corruption on the remote side.)

问题

公司gitlab上代码上传的时候没有编辑好.gitignore文件,造成远端仓库过大,换新设备拉取仓库时发现拉不下来(remote: aborting due to possible repository corruption on the remote side.)

解决方案 - 分步克隆(参考链接

1、克隆最新一次 commit

$ git clone https://xxxxxx.git --depth 1

2、下载所有历史

$ git fetch --unshallow

或者克隆剩余所有

$ git remote set-branches origin '*'
$ git fetch -v
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容