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
:
$ 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.
I ran into the same issue and ran:
git prune
git gc
which mentioned:
error: bad ref for refs/remotes/origin/ticketName
So i removed the reference and that fixed the issue:
rm .git/refs/remotes/origin/ticketName
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.
I have a similar issue and solved it by running:
$ git prune
Output: fatal: unable to parse object: refs/heads/prod-283
and just delete the reference above:
$ rm -f .git/refs/heads/prod-283
and finally I am able to run git pull
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With