【发布时间】:2015-11-23 10:49:46
【问题描述】:
在获取、提取或克隆我的存储库时出现以下错误:
$ git fetch
remote: error: Could not read 9bc3bd2d69d3eeebdbb916f5b6126b7714f90e75
remote: fatal: bad tree object 9bc3bd2d69d3eeebdbb916f5b6126b7714f90e75
remote: aborting due to possible repository corruption on the remote side.
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
fatal: protocol error: bad pack header
当我git -fsck
$ git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (148557/148557), done.
当我git prune 然后git gc
$ git gc
Counting objects: 148557, done.
Compressing objects: 100% (26144/26144), done.
Writing objects: 100% (148557/148557), done.
Total 148557 (delta 90234), reused 148557 (delta 90234)
我在这里搜索了一些解决方案,有些建议删除对象树或移动它,但是:
$ git ls-tree 9bc3bd2d69d3eeebdbb916f5b6126b7714f90e75
fatal: not a tree object
我应该在这里做什么? (这个 repo 在 gitlab 上,我尝试在 sourcetree 和 git bash 上获取它)
【问题讨论】: