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.

3

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.