在git for windows里面不能commit修改,提示open shell

open shell以后,使用git add [filename],会报错:

fatal: Unable to create './.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is running and remove the file manually to continue.

网上查了一下,说输入命令: rm -f ./.git/index.lock, 尝试后发现是不行的,因为-f命令是个简写,可以尝试rm -force ./.git/index.lock

但其实这个报错的意思就是说 github目录下的的/.git/index.lock这个文件已经存在了,需要被删掉.所以可以直接手动进入/.git路径(它是隐藏文件夹,需要直接在路径里打),找到index.lock,然后手动删掉就ok了.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2021-06-19
  • 2021-12-17
  • 2022-02-08
  • 2022-03-07
猜你喜欢
  • 2022-12-23
  • 2021-08-01
  • 2021-10-23
  • 2021-07-11
  • 2022-02-09
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案