Git中顯示:Another git process seems to be running in this repository, e.g.an editor opened by 'git commit'. Please make sure all processesare 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進程似乎正在這個存儲庫中運行,例如 由“git commit”打開的編輯器。請確保所有流程終止,然后重試。如果它仍然失敗,一個git進程可能已在此存儲庫中崩潰:手動刪除文件以繼續。

原因分析:
根據我們所了解到的,windows對於進程的同步互斥管理,是有資源上鎖機制的。猜測這里肯定是有進程對某資源進行了加鎖,但是由於進程突然崩潰,沒來得及解鎖,導致其他進程訪問不了。在於Git在使用過程中遭遇了奔潰,部分被上鎖資源沒有被釋放導致的。
解決方案:
進入項目文件夾下的 .git文件中(顯示隱藏文件夾或rm .git/index.lock)刪除index.lock文件即可。
