git 提交失敗git error Another git process seems to be running in this repository

 一直在用git 來管理代碼,之前網絡不好的時候代碼提交失敗是常有的事情,但是今天報了一個新的錯誤,

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,刪除index.lock文件

就ok了。

原因在於Git在使用過程中遭遇了奔潰,部分被上鎖資源沒有被釋放導致的。

之所以出現這個崩潰,一定是昨天拉取代碼的時候電腦電源短了,可怕,要保護好自己的電源,遠離斷電

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章