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