关于Git的错误

2017-05-04  本文已影响99人  流水不腐小夏

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

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
上一篇 下一篇

猜你喜欢

热点阅读