今天提交代码时,在一次提交,莫名其妙没成功后,再次用git commit -a命令时,出现以下错误,无论是用git还是TortoiseGit都会出现以下这个问题。。
$ git commit -a
fatal: Unable to create 'e:/git/Android/XXXXXX/.git/index.lock': File e
xists.
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.
解决办法:找到index.lock 删除即可
在使用Git进行代码提交时,遇到无法创建index.lock文件的错误。本文详细介绍了这一问题的可能原因,即先前的Git进程在该仓库中崩溃,以及解决办法:确保没有其他Git进程运行,并手动删除index.lock文件。

1378

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



