1

First of all, this is not a duplicate:

Ok, this is my error:

Unable to create '': 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.
Updating ...
Pull operation failed.

What I've done:

From Visual Studio, I tried to do a pull and update a branch, got the mentioned error. Googled a little bit, found solution in Another git process seems to be running in this repository, went to command line (not git bash), tried to delete index.lock unsuccesfully, went to git bash, tried to delete index.lock, no errors index is still present (I guess that it is not index.lock just index). Went to Visual Studio, tried to pull the changes, unsuccessfully, gotten the same error, googled again a little bit and found two other solutions, I found how to terminate git process which is running currently? which I have already tried, then it says that it is a duplicate of https://stackoverflow.com/questions/62977204/git-is-not-working-properly-git-commit-m-45-or-git-reset-hard-or-others-no which is page not found. Question is, what do I do now?

By the way the mentioned file that was not able to create does not exist, the index.lock does not exist either, so removing it does not sort the problem. I think there is a bug somewhere, I just don't know where.

Iria
  • 43
  • 1
  • 10
  • It may well be a duplicate, but the error message `Unable to create '': File exists.` means it may well not. There should be some file name inside the two single quotes here. (The lack of a file name might indicate that you have a bug in your installation of Git, or that Visual Studio is somehow destroying the correct error message.) – torek May 24 '21 at 22:36

2 Answers2

3

I had the same problem too, I deleted the index.lock file with this command.

rm -f ./.git/index.lock
ebed meleck
  • 313
  • 2
  • 5
1

I didn't get it to work, so I had to delete everything, the entire local repository and then clone it again and it worked, it is a workaround and not the proper answer

Iria
  • 433
  • 1
  • 8
  • 20