0

I am getting following error during git commit

Commit failed with error 0 files committed, 3 files failed to commit: Unable to create 'C:/xampp/htdocs/project/.git/index.lock': File exists

Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.

I closed all open terminal and tried again and again, but could not get success.

Thanks for suggesion.

Gautam Rai
  • 2,445
  • 2
  • 21
  • 31

1 Answers1

3

There seems to be two git operations running at the same time.

Try to delete the index.lock file to unlock further operations:

rm -f .git/index.lock

or if there are more locked files:

 rm -f .git/*.lock
Secko
  • 7,664
  • 5
  • 31
  • 37