git 中 切换分支时 /.git/index.lock': File exists. 错误

错误描述: 
fatal: Unable to create 'F:/project/xxx/.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.

会引发出问题
Your branch is behind 'remotes/origin/feature/xxx' by 9 commits, and can be fast-forwarded.

解决:删掉 .git 文件夹中的 index.lock

你可能感兴趣的:(git 中 切换分支时 /.git/index.lock': File exists. 错误)