git使用时出错

来源:互联网 发布:单机手机游戏 知乎 编辑:程序博客网 时间:2024/05/22 23:51

当执行命令

git  rm -f  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.

解决方法:

使用命令  git rm 或者手动删除文件/.git/index.lock

原创粉丝点击