前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >uniapp切换分支的时候 git报错:fatal: Unable to create ‘C:/Users/Administrator/Desktop/unia

uniapp切换分支的时候 git报错:fatal: Unable to create ‘C:/Users/Administrator/Desktop/unia

原创
作者头像
肥晨
发布2024-07-04 18:22:32
780
发布2024-07-04 18:22:32
举报
文章被收录于专栏:微信小程序微信小程序

导文

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上传记录

在这里插入图片描述
在这里插入图片描述

点击这里的路径就能找到文件直接删除就行。

您好,我是肥晨。

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

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 导文
  • 问题描述
  • 问题解决
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档