git fatal:SHA1 COLLISION FOUND [英] git fatal: SHA1 COLLISION FOUND

查看:297
本文介绍了git fatal:SHA1 COLLISION FOUND的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



I seem to have a corrupted repo that I have no idea how to fix...

$ git pull
remote: Counting objects: 141, done.
remote: Compressing objects: 100% (90/90), done.
error: unable to unpack ff7fca002656ad848c44bf134088d638a01d5217 header
error: inflateEnd: stream consistency error (no message)
fatal: SHA1 COLLISION FOUND WITH ff7fca002656ad848c44bf134088d638a01d5217 !
fatal: index-pack failed
Unable to write to standard output: The pipe is being closed.

我似乎有一个损坏的回购,我不知道如何解决...

And this is the output from the fsck:

这是 fsck

$ git fsck error: unable to unpack 024e257c1a13532e7d5579b0ea4bb5915d21e4a6 header error: inflateEnd: stream consistency error (no message) fatal: loose object 024e257c1a13532e7d5579b0ea4bb5915d21e4a6 (stored in super/sectet/path/to/repo/.git/objects/02/4e257c1a13532e7d5579b0ea4bb5915d21e4a6) is corrupt

Any ideas on how to approach this? I basically want to get whatever is in the remote and push my few commits on top of that.

推荐答案

我认为回购得到了由EGit或SourceTree(我并行使用)破坏,并且与实际的散列冲突无关。正如评论所建议的那样,我通过将远程镜像复制为新的仓库,并复制我的更改来解决它。

I think the repo got corrupted by either EGit or SourceTree (which I use in parallel) and has nothing to do with actually hash collisions. I solved it, as suggested by comments, by cloning the remote as a new repo, and copying my changes over.

这篇关于git fatal:SHA1 COLLISION FOUND的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆