另一个git过程似乎在这个仓库中运行 [英] Another git process seems to be running in this repository

查看:1634
本文介绍了另一个git过程似乎在这个仓库中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图学习如何使用Git并创建了一个带有HTML,CSS和Javascript文件的小项目。我从基本空的项目中创建了一个分支,然后对我的代码进行了一些更改。我尝试登台更改,但收到以下错误消息:

I'm trying to learn how to use Git and have created a small project with an HTML, CSS, and Javascript file. I made a branch from my basically empty project and then made some changes to my code. I tried staging the changes but I get the following error message:

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 bash不知道如何离开我以前得到的地方。

Granted, I did run into problems trying to commit my empty project earlier and just quit git bash since I didn't know how to get out of where I somehow had gotten.

有没有什么方法可以解决这个问题,或者我应该开始一个新的存储库?

Is there any way for me to fix this or should I just start a new repository?

推荐答案

尝试删除 .git 目录中的 index.lock 文件。

try deleting index.lock file in your .git directory.

通常,当您同时执行两个git命令时,可能会出现这样的问题,可能是命令提示符和IDE中的一个。

Generally such problems occurs when you execute two git commands simultaneously maybe one from command prompt and one from IDE.

这篇关于另一个git过程似乎在这个仓库中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆