Git-使用中出现“Another git process seems to be running ……”

问题描述

在使用git commit “xxx”的时候,修改记录文件时,按错了按键导致下次commit时报错。

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.

大概的意思就是还有一个进程正在运行,请保证所有进程结束后进行此操作。如果不行,请尝试手动删除文件后再继续。

解决办法

进入到工作目录.git下,如果你没有找到这个目录,可能是没有开启查看隐藏文件的选项,你需要在文件夹选项中进行相关设置。删除index.lock文件,然后开启git-bash,重新进行commit就可以了。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注