Another git process seems to be running in this repository

Another git process seems to be running in this repository

Try deleting index.lock file in your .git directory.

rm -f .git/index.lock

Such problems generally occur when you execute two git commands simultaneously; maybe one from the command prompt and one from an IDE.

Use the below command in the root directory of the application. This will delete the index.lock file and release the active lock.

rm .git/index.lock

Another git process seems to be running in this repository

Deleting my commit message worked for me.

rm .git/COMMIT_EDITMSG

It then said.

fatal: cannot lock ref HEAD: Unable to create .git/refs/heads/[your-branch-name].lock: File exists.

Do notice that your branch name might be different than mine. You can delete this lock file by doing;

rm .git/refs/heads/[your-branch-name].lock

Hope this helps someone.

Leave a Reply

Your email address will not be published. Required fields are marked *