0

Error: Unable to create '.../.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.

But, there is no any git process running? This code works well. But after adding components and routers .It is coming like this. I don't understand the error. One terminal I forced close when running a git code. Is it the error or something else?

Aravind
  • 40,391
  • 16
  • 91
  • 110
Kamalka Fernando
  • 153
  • 1
  • 2
  • 13
  • 1
    Remove index.lock ? – Gayan Jeewantha Apr 28 '20 at 17:02
  • 1
    As you've mentioned in the last sentence, it's because you currently have another instance of `git` running in the same directory - I suggest you kill that instance of `git` (how to do so depends on what OS you're using). – Edric Apr 28 '20 at 17:06
  • https://stackoverflow.com/search?q=%5Bgit%5D+Error%3A+Unable+to+create+index.lock+File+exists – phd Apr 28 '20 at 17:56

1 Answers1

0

I found the answer. But may be not the correct one.

  1. Open local repository
  2. By default .git is hidden while initializing local repository, unhide .git folder.
  3. Open .git folder
  4. Under this "index.lock" file is available, delete that file

This works!!!

Kamalka Fernando
  • 153
  • 1
  • 2
  • 13