Git报错解决方案记录——持续更新

Git报错解决方案记录

Error_1:
Another git process semms 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 remove the file manually to continue…
翻译: 另一个git进程会在这个仓库中运行,例如,一个由’ git commit '打开的编辑器。 请确认所有进程已被终止,然后重试。 如果仍然失败,git进程手动删除文件继续…

Error_1解决方法: 
方式1: 进入项目文件夹下的 .git文件中(显示隐藏文件夹),删除index.lock文件即可
方式2: 在Git终端控制台中,通过指令【cd f:/xxx/xxx/.git】进入到项目文件夹中,
然后通过指令【rm index.lock】删除该文件即可

Error_2:
Cannot delete branch ‘TempBranch’ checked out at ‘F:/TempGit/TestBranch’
翻译: 不能删除该分支【TestBranch】
问题原因:
当前所处于的分支为【TestBranch】,并且使用了删除本地分支命令【git branch -d TestBranch】
就会提示不能删除该分支

Error_2解决方法
1.使用命令【git checkout master】切换到本地主分支
2.使用命令【git branch -d TempBranch】删除本地的【TempBranch】分支
3.使用命令【git branch】查看本地分支,可发现本地分支【TempBranch】已被删除
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值