> git add -A -- .
fatal: Unable to create '/Users/feizhu/Desktop/中科/smart-watch-backend-java/.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 进程(VS Code 的 git 插件、终端里的 git 命令、或之前的 git 操作)异常退出时没有清理锁文件 ;直接执行
bash
rm -f .git/index.lock