git 使用問題 Unable to create '../.git/index.lock': File exists.


git 使用問題

今天使用git是發現無法切換分支,報錯如下:

git -c diff.mnemonicprefix=false -c core.quotepath=false checkout feature/s_mybills
fatal: Unable to create 'E:/'''/.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.

文件被鎖了,刪除鎖文件即可
進入到項目文件夾 執行 rm -f ./.git/index.lock 最好查看一下這個index.lock文件是否存在


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM