独书先生 Menu

Viewing all items for tag git reset

git error: bad signature fatal: index file corrupt 解决方案

问题

写好代码准备使用 git desktop 提交的时候,发现我的项目提示 can’t find XXX (XXX 为项目名),并且使用 git bash 输入:git pull 会提示:

error: bad signature 
fatal: index file corrupt

然后尝试remove掉我的项目,重新 Add Repositories, 也无法识别我的本地项目

解决方案:

步骤1

项目根目录下打开 git bash ,输入:

rm -f .git/index

步骤2

接着输入:

git reset

参考自: https://appsoftea.com/zh/git-error-bad-signature-fatal-index-file-corrupt , 感谢!