技术饭

Git 使用中显示“Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. P”问题解决

copylian    0 评论    14324 浏览    2020.04.23

fatal: Unable to create 'F:/wnmp/www/gittest/.git/index.lock': File exists.,Git提示存在index.lock被锁住,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.

1587623977(1).png

根据我们所了解到的,windows对于进程的同步互斥管理,是有资源上锁机制的。猜测这里肯定是有进程对某资源进行了加锁,但是由于进程突然崩溃,未来得及解锁,导致其他进程访问不了。

这里根据vs2017的git管理工具的提示信息,打开文件夹选项,打开显示隐藏文件,进入工作区目录下的隐藏文件.git,其中的index.lock文件删除掉,然后重新打开git bash进程,问题解决。

1587624125(1).png

只袄早~~~
感谢你的支持,我会继续努力!
扫码打赏,感谢您的支持!
Git  Another commit 

文明上网理性发言!

  • 还没有评论,沙发等你来抢