您的位置:首页 > 其它

Git – fatal: Unable to create 'XXX/.git/index.lock’: File exists.的解决办法

2015-10-27 10:24 459 查看
参考资料:
http://sheshui.me/articles/git-quickly-tutorial-20120517 http://stackoverflow.com/questions/9282632/git-index-lock-file-exists-when-i-try-to-commit-but-cannot-delete-the-file
我的说明:

我操作的是ubuntu环境。window远程

1 若在window下远程打开操作窗口(不是console),进入.git目录删除index.lock文件,删除后再commit会自动再次生成index.lock。无法提交。

2 使用putty console下操作,进入.git目录执行 rm -f index.lock 删除index.lock 虽然能删除,但是也是每次都会再生成。无法提交

3 在.git同级目录,执行rm -f .git/index.lock (或者rm -f git/index.lock) 删除后可提交。成功!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: