您的位置:首页 > 其它

git for windows 无法提交修改的处理

2014-09-02 16:09 141 查看
在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了.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: