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

相关推荐
ACGkaka_1 小时前
IDEA(十一)调整新版本的工具栏显示Git操作(pull、commit、push、revert等)
java·git·intellij-idea
大白的编程日记.1 小时前
【Git学习笔记】Git初识及其结构原理分析(一)
笔记·git·学习
baiyu331 小时前
成为git砖家(9): rebase进阶: 拆分commit为多个
git
Sweet_vinegar1 小时前
版本控制泄露源码 .git
git·安全·web·ctf·ctfshow
想做后端的小C4 小时前
使用SSH密钥连接本地git 和 github
git·ssh·github
ChineHe5 小时前
Git基础篇 - Linux(CentOS)源码安装Git实例
linux·git·centos
Starbright.7 小时前
Git的必要配置
git
AC使者7 小时前
解释 Git 的基本概念和使用方式。
git
biubiubiu070610 小时前
git切换版本
git
edge018 小时前
git的使用
git