您的位置:首页 > 其它

Git: Fix bad signature and index file corrupt error

2015-08-13 11:01 405 查看


Git: Fix bad signature and index file corrupt error

If your git index for some reason becomes invalid and you see this error running usual git commands like 
git
pull
git status
, etc.:
error: bad signature
fatal: index file corrupt


Though it sounds bad, your changes are still there. Fix it by first removing the index file, then resetting the branch:
rm .git/index
git reset


You should be all good now. To be safe, make a backup of 
.git/index
before you delete it.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git