Re: After update to 1.6.3.1. I get this error: error: bad index file sha1 signature
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- May 29, 2009, 09:33 UTC
- Message-ID
- <4A1FABCC.7000808@viscovery.net>
- In-Reply-To
- <64fe838e0905290025h6bf2172agea4beb1ccff6dd6e@mail.gmail.com>
Thorben Schröder schrieb:
Show 11 quoted lines
> I've recently updated from 1.6.1.2 to 1.6.3.1 on OS X. And after that > transition I get this: > > error: bad index file sha1 signature > fatal: index file corrupt > > on any git command I invoke in any of my repositories. I even tried to > go back to 1.6.1.2 but the error still occurs. > > Is there any thing I can do to fix this? Would be great, otherwise all > my local repositories are busted :/
In one of your less important repositories you can try:
$ mv .git/index .git/index.prev $ git reset
This reconstructs the index file from the HEAD commit. You loose only what you might have staged for the next commit, but otherwise this will neither change you repostitory nor your working directory.
You can keep .git/index.prev around for a while; perhaps someone from this list wants it for more diagnoses.
As to why this happened, I don't know, but it's certainly interesting.
-- Hannes