git遇到的问题-- Another git process seems to be running in this repository
執(zhí)行g(shù)it add .時(shí),報(bào)錯(cuò)
fatal: Unable to create '/Users/lily/ForWork/forReBaomai/bm-fe/.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.
大致意思是說:在/Users/lily/ForWork/forReBaomai/bm-fe/.git里創(chuàng)建index.lock失敗:文件已存在。git的進(jìn)程已經(jīng)在一個(gè)編輯器中被打開。請(qǐng)確保所有的進(jìn)程都結(jié)束,然后再次嘗試。如果仍然失敗,可能是上個(gè)運(yùn)行中的git崩潰,手動(dòng)移除這個(gè)文件
解決方法:open?/Users/lily/ForWork/forReBaomai/bm-fe/.git 打開.git文件夾,刪除該文件下的.git文件即可
或者 rm -f ./.git/index.lock
原因:據(jù)說是計(jì)算機(jī)對(duì)于進(jìn)程的同步互斥管理,是有資源上鎖機(jī)制的。猜測(cè)這里肯定是有進(jìn)程對(duì)某資源進(jìn)行了加鎖,但是由于進(jìn)程突然崩潰,未來得及解鎖,導(dǎo)致其他進(jìn)程訪問不了
查了半天只查到這么一個(gè)原因,所有文章都只有這么一個(gè)解釋,暫時(shí)記著吧
轉(zhuǎn)載于:https://www.cnblogs.com/fancyLee/p/9800647.html
超強(qiáng)干貨來襲 云風(fēng)專訪:近40年碼齡,通宵達(dá)旦的技術(shù)人生總結(jié)
以上是生活随笔為你收集整理的git遇到的问题-- Another git process seems to be running in this repository的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: iOS面试知识点梳理
- 下一篇: 我的前端工具集(四)树状结构后篇