问题:
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.
分析:
根据翻译可以看出来commit 被占用
另一个 git 进程似乎正在此存储库中运行,例如
由“git commit”打开的编辑器。请确保所有流程
已终止,然后重试。如果仍然失败,则 git 进程
可能之前在此存储库中崩溃:
手动删除文件以继续。
解决方案:
直接删除 index.lock
该文件
rm -f .git/index.lock
运行即可
参考文档:Git报错