0

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

user1805458
  • 1,081
  • 3
  • 9
  • 21
  • Do you have a way to try reproducing the issue from git command line? – JacobIRR Mar 29 '18 at 23:40
  • Yes, it was on git command line to begin with. I only use git command line. I did git commit -a – user1805458 Mar 30 '18 at 00:24
  • Question: Do you see the same, or similar, files being _added_ in your `git status` report? Sometimes moving/renaming a file in Git would register as a deletion followed by an addition. – Tim Biegeleisen Mar 30 '18 at 03:12
  • git status shows the same thing as git commit -a . I first see all the files marked as deleted. Then I see my folders showing up as untracked – user1805458 Mar 30 '18 at 03:22

1 Answers1

0

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

Dmitrii Smirnov
  • 7,073
  • 1
  • 19
  • 29