【问题标题】:how to find git process pending and terminated如何找到 git 进程挂起和终止
【发布时间】:2021-08-12 16:29:59
【问题描述】:

首先,这不是重复的:

好的,这是我的错误:

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 中,我尝试拉取并更新分支,得到了上述错误。 谷歌了一下,在Another git process seems to be running in this repository 找到了解决方案,进入命令行(不是 git bash),尝试删除 index.lock 失败,进入 git bash,尝试删除 index.lock,没有错误索引仍然存在(我猜测它不是 index.lock 只是索引)。 去了 Visual Studio,试图拉动更改,不成功,得到同样的错误,再次谷歌搜索并找到其他两个解决方案,我找到了我已经尝试过的 how to terminate git process which is running currently?,然后它说它是 @ 的副本987654323@ 这是找不到页面。 问题是,我现在该怎么办?

顺便说一句,无法创建的文件不存在,index.lock 也不存在,因此删除它不会对问题进行排序。我认为某处有错误,我只是不知道在哪里。

【问题讨论】:

  • 它很可能是重复的,但错误消息Unable to create '': File exists. 表示它很可能不是。这里的两个单引号内应该有一些文件名。 (缺少文件名可能表明您的 Git 安装存在错误,或者 Visual Studio 以某种方式破坏了正确的错误消息。)

标签: git visual-studio git-bash pull


【解决方案1】:

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

rm -f ./.git/index.lock

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-27
      • 2011-08-10
      • 2020-06-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多