GIT: /.git/index.lock': File exists


I am having a constant issue with one of my git repos. I keep getting the following error:

    fatal: Unable to create 'v:/path/to/files/.git/index.lock': File exists.

    If no other git process is currently running, this probably means a
    git process crashed in this repository earlier. Make sure no other git
    process is running and remove the file manually to continue.

I have tried: rm -f ./.git/index.lock as per another thread on stackoverflow but I get this error each time: rm: cannot unlink `./.git/index.lock’: Permission denied

When I close down aptana (I am using git in the terminal) I cannot delete the file still.

Any ideas how to get around this?

Another thing to note is this git repo is very slow when I do occasionally get to commit within it (it allows me every 10 tries or so)



The issue ended up being Aptana, everytime I ran this it would cause this error when I tried to commit in git.

I stopped using aptana studio and I don’t have this issue anymore.

Answered By – sluggerdog

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published