git index.lock File exists when I try to commit, but cannot delete the file

This may be an old reply but I’m hoping this is more useful on next who need this solution.

On linux/unix/gitbash/cygwin, try

rm -f .git/index.lock

On Windows Command Prompt, try:

del .git\index.lock

Leave a Comment