Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Nov 242012
 

Fix git's fatal: index file corrupt

Answer:

When you experienced when your git repository might return the following error when you perform the status command, e.g.

# git status
error: bad index file sha1 signature
fatal: index file corrupt

To fix it, simply type

# rm -f .git/index

Then

# git reset

That's it.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>