Create file with incorrect case, refactor - rename, old name left as orphan item to Git

I accidentally created a new java file called (using simple example) kevin.java. I realized the mistake and did a refactor rename to Kevin.java like it should be. Refactor worked but doing

git status

Showed kevin.java as both an added and modified file leaving it in limbo.

I did

git rm -f --cached kevin.java

To get rid of the bad file. This solved the problem but I did not know if this was a situation that IntelliJ should have handled by default.

Please sign in to leave a comment.