Git

如果第一次commit失败,第二次执行执行git commit -a 的时候,提示第一次没结束怎么办?

[root@iZ94wj4cbeuZ testproject]# git commit -a
fatal: Unable to create '/root/testproject/.git/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.

zp0824 - 好好学习,天天向上

赞同来自:

ps ax | fgrep git 看看原来的commit进程是不是还在,在的话先将它kill掉。然后删掉/root/testproject/.git/index.lock文件。

封尘 - 如:80后IT男..

赞同来自:

杀掉原来commit进程的命令是什么?

存在 - 一句话介绍

赞同来自:

ps ax | fgrep git 如果该进程存在会有进程id ,然后 “kill 进程id”

要回复问题请先登录注册