Reputation: 2505
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.
Upvotes: 0
Views: 5478
Reputation: 7716
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
Upvotes: 3