2013年10月28日 星期一

[GIT] "fatal: index file corrupt"

Problem:
I got an error message when I try to do git status and git reset --hard HEAD

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


Solution:
1. Delete file .git/index
2. git reset


Reference: 
http://blog.wu-boy.com/2010/08/git-%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6%EF%BC%9A%E5%88%A9%E7%94%A8-git-reset-%E6%81%A2%E5%BE%A9%E6%AA%94%E6%A1%88%E3%80%81%E6%9A%AB%E5%AD%98%E7%8B%80%E6%85%8B%E3%80%81commit-%E8%A8%8A%E6%81%AF/


沒有留言:

張貼留言