错误信息1
Unable to create ‘C:/Java/System/.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 执行操作时会自动生成 index.lock 文件,操作结束后会自动删除。这样做的目的是避免同时操作同一个文件夹。
解决方法
打开项目所在文件夹,进入 .git/目录,删除index.lock文件,然后重新提交。
错误信息2
解决方案
按下图操作后重新提交。