今天提交代码时,在一次提交,莫名其妙没成功后,再次用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.

 

解决办法:

找到index.lock 删除即可

 或者  cd .git

    del index.lock

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-11-01
猜你喜欢
  • 2021-05-25
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-04-14
相关资源
相似解决方案