问题
- 在使用git add . 的时候出现报错
fatal: Unable to create ‘xxx/.git/index.lock’: File exists.
Another git process seems to be running in this repository, e.g. an editor opened by ‘git commit’. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier:remove the file manually to continue.
解决方法
- 去开发着选项里,把显示隐藏和系统文件打开
- 回到仓库的文件夹里,看到出现了.git文件夹
- 点进去之后把index.lock文件删除(就是unable to create 的那个文件)
- 回到仓库里再使用常规方法提交就好了