背景
在使用命令提交代码或文档时,出现提交失败问题
报错
fatal: Unable to create 'D:/workspace-nxg/blog-star/obsidian-notes/.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.
解决方法
手动删除 index.lock 文件
打开 D:/workspace-nxg/blog-star/obsidian-notes/.git/ 目录。
找到 index.lock 文件并删除它。