您的位置: 首页 > 编程笔记

git 出现stderr: error: bad signature fatal: index file corrupt

Git 时间:2019-09-02  查看:31   收藏

 git status回车出现如下错误


stderr: error: bad signature
fatal: index file corrupt


在项目有.git这同级打开Git Bash Here


1. 输入 
$ rm -f .git/index

出现

ssss@DESKTOP-ssssMINGW64 /e/project/ssss(master)


2. 再输入

$ git reset


出现如下没有提交的文件说明好了,然后重启开发工具就行。
Unstaged changes after reset:
M       sss/app/src/main/AndroidManifest.xml
M      sss/app/src/main/java/com/bjsslt/iblueandroid/api/ApiService.java
M       sss/app/src/main/java/com/bjsslt/iblueandroid/ui/activity/MainActivity.java
M      sss/app/src/main/java/com/bjsslt/iblueandroid/ui/activity/me/MyAccountActivity.java
M       sss/app/src/main/java/com/bjsslt/iblueandroid/ui/activity/me/SettingActivity.java
M       sss/app/src/main/java/com/bjsslt/iblueandroid/ui/activity/me/persondetial/CompanyActivity.java
M      sss/app/src/main/java/com/bjsslt/iblueandroid/ui/activity/me/persondetial/FullNameActivity.java
M       sss/app/src/main/java/com/bjsslt/iblueandroid/ui/fragment/MeFragment.java
M       sss/app/src/main/res/layout/activity_company.xml
M       sss/app/src/main/res/layout/activity_full_name.xml
M       sss/app/src/main/res/layout/fragment_me.xml
M      sss/app/src/main/res/mipmap-xhdpi/icon_photo.png
M       sss/app/src/main/res/values/colors.xml
M      sss/app/src/main/res/values/styles.xml


sss@DESKTOP-sss MINGW64 /e/project/sss (master)

然后重启开发工具就好了


 

0% (0)
0% (0)
0.072820s