Stuck on Git on Windows: Can't checkout, can't stash, can't commit
我被困了......如果我做git stash我得到:
1 | 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. |
手动删除index.lock后,我得到:
1 | Rename from .git/index.lock to .git/index failed. Should I try again? (y/n) |
git checkout master:
1 | Rename from .git/index.lock to .git/index failed. Should I try again? (y/n) |
git通过GitHub提交:
1 | Unable to create a new commit |
我能做什么?
使用通用修复程序解决了所有软件问题:重新启动计算机。
一个进程当然锁定了文件。 您可以使用SysInternals Suite中的Process Explorer找到哪一个:在> Find> Find Handle或Dll中输入路径的一部分....大多数时候,没有必要重新启动计算机,它可以像 关闭
它发生在Windows上的某个时候。
解决方案很简单:关闭Explorer窗口。