一 报错:fatal: Unable to create ‘xx/.git/index.lock’: File exis
如下:
$ git commit
fatal: Unable to create 'xx/.git/index.lock': 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.
二 解决方案
1 资源管理器
2 命令
进入到项目目录根处,即报错’xx/.git/index.lock’中的xx路径,输入以下指令。
$ rm .git/index.lock
ps:git rm访问不到xx/.git,不会生效。