git add 错误修改方法

git add a.txt

报如下错误:

fatal: Unable to create 'E:/git/.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.

 

只需要删除E:/git/.git/index.lock 下的index.lock文件即可,

.git 是隐藏文件,设置隐藏文件显示即可。

posted @ 2016-11-21 10:26  辣牛  阅读(1838)  评论(0编辑  收藏  举报