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项目,然后把代码上传到该项目里了,后面计划就在这个项目里更新了

相关推荐
小镇敲码人6 小时前
【深入浅出 Git】:从入门到精通
git
gqkmiss9 小时前
Git 常用命令集与实际使用 Demo
大数据·git·elasticsearch·git 命令·git 命令大全
yantuguiguziPGJ10 小时前
Windows 下搭建 Git 本地服务器并进行开发
git
程序猿chen14 小时前
安全岗の夺命连环问:(第壹篇)从XSS到0day的灵魂拷问
前端·git·安全·面试·跳槽·xss·改行学it
ducking__20 小时前
git基本使用
git
xujiangyan_21 小时前
MySQL的半同步模式
数据库·git·mysql
Caroline皮皮1 天前
团队开发中的Git 文件名大小写不敏感导致的文件冲突
git
9ilk1 天前
【Git】--- 多人协作实战场景
git
lllsure1 天前
Git使用与管理
git
座山雕~1 天前
Maven超级详细安装部署
git·github·maven