解决关于Git无法提交 index.lock File exists的问题

466 阅读1分钟

问题呈现:

fatal: Unable to create '/Users/tongen/Documents/开源/NutUI-React/.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.

问题原因: mac被迫重启了。

问题解决:

rm .git/index.lock