uniapp切换分支的时候 git报错:fatal: Unable to create ‘C:/Users/Administrator/Desktop/uniapp-food/.git/index.l

7 篇文章 0 订阅

在这里插入图片描述


导文

uniapp切换分支的时候 git报错
fatal: Unable to create ‘C:/Users/Administrator/Desktop/uniapp-food/.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.

问题描述

今天在切换分支的时候,突然发现切换不了,并且报了如下错误提示:
在这里插入图片描述

问题解决

(1)在 .git 同级目录中找到 index.lock ,删除就可以了。

(2)在 .git 同级目录执行 rm -f .git/index.lock 将文件删除就可以了。

会遇到项目git文件隐藏,或者公司屏蔽rm -f等方法
可以使用查找git上传记录
在这里插入图片描述
点击这里的路径就能找到文件直接删除就行。

您好,我是肥晨。
欢迎关注我获取前端学习资源,日常分享技术变革,生存法则;行业内幕,洞察先机。

  • 13
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

奶糖 肥晨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值