由于缺少对象,我可以用Git损坏做什么? [英] What can I do with Git corruption due to a missing object?
问题描述
git clone git@codebasehq.com:blah / blah / docs.git
克隆到文档中...
remote:计数对象:343,完成。
remote:error:无法找到14f87a739828e4d489b0310a51e057b30333926e
remote:压缩对象:100%(325/325),完成。
错误:git上传包:git-pack-objects死于错误。
致命:git upload-pack:由于远程端可能的资源库损坏而中止。
remote:致命:无法读取14f87a739828e4d489b0310a51e057b30333926e
remote:由于远程端可能存储库损坏而异常终止。
致命:早期EOF
致命:索引包失败
很少有研究,并且发现了 git fsck
,这里是输出:
$ git fsck --full
error:sha1 mismatch 14f87a739828e4d489b0310a51e057b30333926e
错误:14f87a739828e4d489b0310a51e057b30333926e:object corrupt or missing
missing blob 14f87a739828e4d489b0310a51e057b30333926e
所有其他遇到类似问题的人都会遇到链接问题或其他问题。我还是一个新的Git,有谁知道如何解决这个问题?
我仍然可以推送到我的中央远程存储库,但我无法克隆它。
14f87a739828e4d489b0310a51e057b30333926e
是一个blob,它是存储库根目录中的降价文件。我试图删除这个文件,并推送这些更改无济于事。
编辑:可以从另一个回购中导入git历史记录?我想我可以开始一个新的回购协议,并将我的文件复制到其中,然后导入提交历史记录。
几乎是一个非常详细的解决方案相同的问题: Github Repo腐败 - Sha1碰撞
I just went to clone a repository on another remote server and ran into an issue trying to do so:
git clone git@codebasehq.com:blah/blah/docs.git
Cloning into docs...
remote: Counting objects: 343, done.
remote: error: unable to find 14f87a739828e4d489b0310a51e057b30333926e
remote: Compressing objects: 100% (325/325), done.
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: fatal: unable to read 14f87a739828e4d489b0310a51e057b30333926e
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed
I did a little research and found out about git fsck
, here is the output:
$ git fsck --full
error: sha1 mismatch 14f87a739828e4d489b0310a51e057b30333926e
error: 14f87a739828e4d489b0310a51e057b30333926e: object corrupt or missing
missing blob 14f87a739828e4d489b0310a51e057b30333926e
All other people with similar problems have a broken link issue or something. I'm still fairly new with Git, does anyone know how to fix this?
I can still push to my central remote repository, but I can't clone it.
14f87a739828e4d489b0310a51e057b30333926e
is a blob that is a markdown file in the repository root. I tried deleting this file and push those changes to no avail.
Edit: Is it possible to import git history from a another repo? I'm thinking I could just start a new repo and copy my files into it and then import the commit history.
Here is almost the same question with a very detailed solution: Github Repo Corruption - Sha1 Collision
这篇关于由于缺少对象,我可以用Git损坏做什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!