解决git报错:If no other git process is currently running, this probably means的方案

淡淡的烟草味﹌ 2022-09-04 11:49 122阅读 0赞

解决git报错:git process crashed in this repository earlier. Make sure no other git的方案

    • git执行时报错
    • 解决方案

git执行时报错

  1. If no other git process is currently running, this probably means a
  2. git process crashed in this repository earlier. Make sure no other git
  3. process is running and remove the file manually to continue.

在这里插入图片描述

解决方案

原因:用SourceTree提交代码,发现这个问题。好像是因为上个进程没停止,造成文件不识别

解决:把仓库目录里的.git/index.lock文件(文件是隐藏的)删除就可以了。删除index.lock不会影响Git使用。是说index文件被锁住了,但是还有一个index文件要进行操作。

  1. cd .git
  2. ll

会找到index.lock文件
在这里插入图片描述

  1. rm -rf index.lock

删除此文件即可

发表评论

表情:
评论列表 (有 0 条评论,122人围观)

还没有评论,来说两句吧...

相关阅读