Git操作失敗並提示Another git process seems to be running in this......

Git操作的過程中突然顯示Another git process semms 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 remove the file manually to continue…
翻譯過來就是git被另外一個程序佔用,重啓機器也不能夠解決。

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

解決方案:進入項目文件夾下的 .git文件中(顯示隱藏文件夾或rm .git/index.lock)刪除index.lock文件即可。

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