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 是隐藏文件,设置隐藏文件显示即可。

转载于:https://www.cnblogs.com/liuna/p/6084532.html

你可能感兴趣的:(git add 错误修改方法)