9

我被卡住了......如果我做 git stash 我得到:

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 后,我得到:

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

git结帐大师:

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

通过 GitHub 提交:

Unable to create a new commit

我能做些什么?

4

3 回答 3

18

使用所有软件问题的通用修复程序解决了它:重新启动计算机。

于 2013-09-20T15:07:34.840 回答
4

它有时会在 Windows 上发生在我身上。

解决方法很简单:关闭资源管理器窗口

于 2016-02-22T02:16:17.763 回答
3

一个进程肯定会锁定文件。您可以使用SysInternals Suite中的Process Explorer来查找哪一个:在> Find > Find Handle or Dll...中输入部分路径。大多数情况下,无需重新启动计算机,就像关闭窗口一样简单。Explorer.exe

于 2015-08-05T01:45:44.420 回答