Problem:
You use the VCS system in Intellij and try to commit stuff. Commit fails and Intellij claims that index.lock exists. You check .git/index.lock in your repo directory and find out that it does indeed not exist.
Setup:
- Intellij Ultimate 2018.1
- Java 8 project
- Git 2.16.1
- Windows 10
I tried creating a an index.lock file manually and then deleting it with git bash and also with Windows cmd. Did not work. I checked that there were no other programs using git. I restarted my PC and made sure nothing used Git.
I used Git Bash and committed manually without Intellij. Works perfectly fine. But after that the VCS commit in Intellij still claims that index.lock exists.
Similar questions that line out solutions that did not work: Git - fatal: Unable to create '/path/my_project/.git/index.lock': File exists