git命令出现fatal: Unable to create ‘xxx/.git/index:File exists.问题

  • Post author:
  • Post category:其他


用git commit命令时,出现

fatal: Unable to create ‘xxx/.git/index:File exists.

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

文件;

或者直接在命令行输入

rm -f .git/index.lock



版权声明:本文为hhhhhh5863原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。