关于Git的错误

xiaoxiao2021-02-27  473

写完代码以后,不能继续提交,错误显示是这样的。

fatal: Unable to create '/Users/Demo/.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.

大致意思是,有个其他进程在操作这个仓库,所以无法继续提交。

只需要删除index.lock文件即可。

rm .git/index.lock
转载请注明原文地址: https://www.6miu.com/read-1853.html

最新回复(0)