The best answers to the question “Another git process seems to be running in this repository” in the category Dev.
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.
Granted, I did run into problems trying to commit my empty project earlier and just quit git bash since I didn’t know how to get out of where I somehow had gotten.
Is there any way for me to fix this or should I just start a new repository?
Use the below command in the root directory of the application. This will delete the index.lock file and release the active lock.
index.lock file in your
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.
Ok I ended up getting it to work by running ‘$ git rm .git/index.lock’… It’s weird because I did that a few times before to no avail but hey computers right?
Deleting my commit message worked for me.
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;
Hope this helps someone.