一直在用git 来管理代码,之前网络不好的时候代码提交失败是常有的事情,但是今天报了一个新的错误,
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文件
就ok了。
原因在于Git在使用过程中遭遇了奔溃,部分被上锁资源没有被释放导致的。
之所以出现这个崩溃,一定是昨天拉取代码的时候电脑电源短了,可怕,要保护好自己的电源,远离断电
本文介绍了一种常见的Git操作中遇到的问题:在尝试提交代码时遇到index.lock文件被锁定的情况,并提供了简单的解决方案——手动删除index.lock文件。
559

被折叠的 条评论
为什么被折叠?



