git 提交失败git error Another git process seems to be running in this repository

来源:互联网 发布:网络经过路由器变慢了 编辑:程序博客网 时间:2024/06/15 15:59

 一直在用git 来管理代码,之前网络不好的时候代码提交失败是常有的事情,但是今天报了一个新的错误,

Another git process seems to be running in this repository, e.g.an editor opened by 'git commit'. Please make sure all processesare terminated then try again. If it still fails, a git processmay have crashed in this repository earlier:remove the file manually to continue.
解决就是,找到工程目录的隐藏文件夹.git,删除index.lock文件

就ok了。

原因在于Git在使用过程中遭遇了奔溃,部分被上锁资源没有被释放导致的。

之所以出现这个崩溃,一定是昨天拉取代码的时候电脑电源短了,可怕,要保护好自己的电源,远离断电

0 0
原创粉丝点击