Git – fatal: Unable to create ‘/path/my_project/.git/index.lock’: File exists

Try

rm -f ./.git/index.lock

In your repository directory. The error message is rather explicit as to what causes it typically, so if you have no other git processes running (which is the normal case), go ahead and delete that file.

Leave a Comment