$ git add .
fatal: Unable to create 'D:/Git/ocr/.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.
解决办法:
进入对应项目的.git目录将index.lock文件删除 再重新添加
本文介绍了一种常见的情况:当使用Git时遇到无法创建文件锁的问题,并提供了解决方案。通常这表明有其他的Git进程正在运行或者之前有过异常终止的Git操作遗留问题。文章指导如何手动删除锁定文件,恢复正常的工作流程。
1万+

被折叠的 条评论
为什么被折叠?



