git仓库被锁了怎么办

git.exe rm -f --cache [...]

fatal: Unable to create 'D:/go-base/.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 did not exit cleanly (exit code 128)

 

 

解决方案:进入项目文件夹下的 .git文件中(显示隐藏文件夹或rm .git/index.lock)删除index.lock文件即可。

你可能感兴趣的:(git仓库被锁了怎么办)