简体   繁体   中英

Git commit -a is showing all files as deleted

I believe some of the people might have encountered this similar issue.

Suddenly, when I do git commit -a, it states that all my files are deleted and I need to add them back in.

Based on some of the discussions here, it looks like it might have to do with .git/index being messed up

I have tried removing the .git/index file and then doing git reset --hard HEAD but to no avail.

Is there anything else I can do to get out of this crappy situation without having to re-clone? I know wiping my whole repo and doing re-clone will work but is very cumbersome to have to do that every time I have this situation.

I do use IntelliJ to work off my repo, is it possible it is messing up my git index?

Thanks

What are the actual changes you do before committing? Is it some move/rename changes? The issue looks like https://youtrack.jetbrains.com/issue/IDEA-181823

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM