Reputation: 4087
I'm stuck... If I do 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 removing index.lock, I get:
Rename from .git/index.lock to .git/index failed. Should I try again? (y/n)
git checkout master:
Rename from .git/index.lock to .git/index failed. Should I try again? (y/n)
git commit via GitHub:
Unable to create a new commit
What can I do?
Upvotes: 9
Views: 10696
Reputation: 2137
It happens sometime to me on Windows.
Solution is simple: close Explorer windows.
Upvotes: 4
Reputation: 3040
A process certainly had the file locked. You can use Process Explorer from the SysInternals Suite to find which one : enter part of the path in > Find > Find Handle or Dll.... Most of the time, there's no need to restart your computer, it can be as easy as closing an Explorer.exe
window.
Upvotes: 3
Reputation: 4087
Solved it using the universal fix for all software problems: restarted the computer.
Upvotes: 18