故障现象:
$ git commit -m "1st commit"
fatal: Unable to create 'D:/git/2_wechat/.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.
解决方法:
Administrator@DEEP-2205010009 MINGW64 /d/git/2_wechat (master)
$ rm -f ./.git/index.lock
Administrator@DEEP-2205010009 MINGW64 /d/git/2_wechat (master)
$ git commit -m "1st commit"
[master (root-commit) 4f33358] 1st commit
1 file changed, 2 insertions(+)
create mode 100644 good.txt
Thanks to :
使用Git 报错 fatal: Unable to create ... git index.lock_PrinciplesMan的博客-CSDN博客