寫完代碼以後,不能繼續提交,錯誤顯示是這樣的。
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