git 报错: fatal: Unable to create 'C:/Users/Administrator/learngit/.git/index.lock': File exists. Anot

Git使用中,输入git commit -m ""报错:

git 报错:
fatal: Unable to create 'C:/Users/Administrator/learngit/.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工作路径下,找到.git文件,如果找不到就点击查看,选择显示隐藏的内容,然后进入,删除index.lock文件,重启Git即可。

 


 

发布了88 篇原创文章 · 获赞 47 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/dai_ma_dong/article/details/103367190