如何找到 git 进程挂起和终止

how to find git process pending and terminated

首先,这不是重复的:

好的,这是我的错误:

Unable to create '': 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.
Updating ...
Pull operation failed.

我做了什么:

从 Visual Studio 开始,我尝试拉取并更新一个分支,但遇到了上述错误。 谷歌了一下,在 中找到解决方案,转到命令行(不是 git bash),尝试删除 index.lock 不成功,转到 git bash,试图删除 index.lock,没有错误索引仍然存在(我猜它不是 index.lock 只是索引)。 去了 Visual Studio,试图提取更改,但没有成功,得到了同样的错误,再次用谷歌搜索了一下,找到了另外两个解决方案,我找到了 which I have already tried, then it says that it is a duplicate of ,这是找不到页面。 问题是,我现在该怎么办?

顺便提一下,无法创建的文件不存在,index.lock 也不存在,所以删除它并不能解决问题。我认为某处有错误,我只是不知道在哪里。

我没有让它工作,所以我不得不删除所有内容,整个本地存储库,然后再次克隆它并且它起作用了,这是一种解决方法,而不是正确的答案

我也遇到了同样的问题,我用这个命令删除了index.lock文件。

rm -f ./.git/index.lock