从国外博客 查到 (ps 我这个错误是add index 时候eclipse 异常关闭然后就不行了)
http://www.metod.si/eclipse-adding-files-to-git-index-problem/
https://stackoverflow.com/questions/9282632/git-index-lock-file-exists-when-i-try-to-commit-but-cannot-delete-the-file
思路就是删掉一个lock
删除即可
Check if a file ‘index.lock’ exists in the .git folder located in the root folder of your project.
If so, remove it and you can continue working!
-
rm .git /index.lock