Got stuck on Git on Windows: cannot verify, cannot hide, cannot execute

I'm stuck ... If I do a git stash, I get:

Fatal: Unable to create /index.lock: File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue. 

After manually deleting index.lock, I get:

 Rename from .git/index.lock to .git/index failed. Should I try again? (y/n) 

git check wizard:

  Rename from .git/index.lock to .git/index failed. Should I try again? (y/n) 

git pass through github:

 Unable to create a new commit 

What can I do?

+8
git github
source share
4 answers

Solved it with a universal fix for all software problems: restart your computer.

+13
source share

The process, of course, locked the file. You can use the Process Explorer from SysInternals Suite to find which one: enter part of the path in> Find> Find Descriptor or Dll .... In most cases there is no need to restart the computer, it can be as simple as closing the Explorer.exe window Explorer.exe .

+2
source share

This happens sometime with me on Windows.

The solution is simple: close the windows explorer .

+1
source share

As @luqita said, restarting the resolved problem, here is my solution if you have a new repo. Try removing index.lock or config.lock before moving on to an alternative solution.

Set aside the .git rm -rf .git folder and start again with git init .

-one
source share

All Articles