git clone报错fatal: pack has bad object at offset 186137397: inflate returned 1

逐步拷贝

https://stackoverflow.com/questions/27653116/git-fatal-pack-has-bad-object-at-offset-x-inflate-returned-5

https://www.cnblogs.com/Lenbrother/p/17726195.html

https://cloud.tencent.com/developer/ask/sof/107092182

bash 复制代码
git clone --depth 1 <repository-url>
cd <repository-directory>
#然而还是失败
git fetch --unshallow

#均失败
git fetch --depth=100
git fetch --depth=50
git fetch --depth=40
#成功
git fetch --depth=30

#失败
git fetch --depth=35
git fetch --depth=31

发现出错的在31

获取期间的commit

bash 复制代码
$ git log --pretty=format:"%H" | sed -n '30,40p'
c736xxxx

由于是我自己的项目,所以我计划把这次提交的大文件删除掉,然后再下载代码

但是对应commit的文件其实已经不在了,已经被删了,所以其实无从下手

最后从是直接在git页面上点击download下载的代码

为了方便后期使用,我新建了一个git项目,然后把代码上传到该项目里了,后面计划就在这个项目里更新了

相关推荐
Jooolin4 小时前
【编程史】Git是如何诞生的?这可并非计划之中...
linux·git·ai编程
Lw老王要学习9 小时前
VScode 使用 git 提交数据到指定库的完整指南
windows·git·vscode
去旅行、在路上9 小时前
Git & Svn
git·svn
abcnull10 小时前
github中main与master,master无法合并到main
git·github
养意15 小时前
git提交代码和解决冲突修复bug
git·bug
码农黛兮_461 天前
Git 常用命令大全
git
一弓虽1 天前
git 学习
git·学习
疯狂的沙粒2 天前
如何通过git命令查看项目连接的仓库地址?
大数据·git·elasticsearch
qq_254617772 天前
Gerrit+repo管理git仓库,如果本地有新分支不能执行repo sync来同步远程所有修改,会报错
git
π大星星️2 天前
Git分布式版本控制工具
分布式·git