git更新pull报错Pulling 1 repository Remote does not have refs/heads/rel5.1 available for fetch

解决Git更新分支时遇到的‘分支已删除’错误
当尝试更新Git分支时,如果出现‘分支已删除’的错误,这通常是因为试图拉取的分支不存在。解决方法包括重新选择并克隆需要的分支,或者使用远程操作删除不再需要的分支。具体步骤为:右键点击应用工程,选择Team -> Remote -> Fetch From...,完成更新后配置并删除废弃分支。

转载自 链接:https://blog.youkuaiyun.com/zyp630998758/article/details/106717926

更新分支的时候,报如下图错误:

原因:分支被删除,拉取失败(注意:以后用哪个分支就clone哪个分支,不要把所有的分支都clone)

解决办法:如下图:选中应用工程右键-Team-Remote-Fetch From...-Finish-configure-选中要删除的分支路径,点击右侧的Delete-save and fetch

Started by user admin Loading library devops-pipeline-javalib@stable Attempting to resolve stable from remote references... > git --version # timeout=10 > git --version # 'git version 2.39.2' using GIT_ASKPASS to set credentials cn_gerrit > git ls-remote -h -- https://pipelineshare@code.srdcloud.cn/srdcloud/ci/pipeline-lib # timeout=10 Could not find stable in remote references. Pulling heads to local for deep search... > git rev-parse --resolve-git-dir /var/jenkins_home/caches/git-fd95616fe0e6bef573574e17c47c025b/.git # timeout=10 Setting origin to https://pipelineshare@code.srdcloud.cn/srdcloud/ci/pipeline-lib > git config remote.origin.url https://pipelineshare@code.srdcloud.cn/srdcloud/ci/pipeline-lib # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 > git --version # 'git version 2.39.2' > git config --get remote.origin.url # timeout=10 using GIT_ASKPASS to set credentials cn_gerrit > git fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse stable^{commit} # timeout=10 > git branch -a -v --no-abbrev --contains 16e9c14a04046c82772c8a815fff8ffc7a9a5a5a # timeout=10 Selected match: master revision 16e9c14a04046c82772c8a815fff8ffc7a9a5a5a Selected Git installation does not exist. Using Default The recommended git tool is: NONE using credential cn_gerrit Cloning the remote Git repository Cloning with configured refspecs honoured and without tags Cloning repository https://pipelineshare@code.srdcloud.cn/srdcloud/ci/pipeline-lib > git init /var/jenkins_home/workspace/console-f83804ea-acee-4106-b342-55cf1173cc67@libs/3e2ba11f4bc0649e9148ab1ac29b8dec6048fc7a122fa263de1e52daf64f4d6e # timeout=10 Fetching upstream changes from https://pipelineshare@code.srdcloud.cn/srdcloud/ci/pipeline-lib > git --version # timeout=10 > git --version # 'git version 2.39.2' using GIT_ASKPASS to set credentials cn_gerrit > git fetch --no-tags --force --progress -- https://pipelineshare@code.srdcloud.cn/srdcloud/ci/pipeline-lib +refs/heads/*:refs/remotes/origin/* # timeout=10 > git config remote.origin.url https://pipelineshare@code.srdcloud.cn/srdcloud/ci/pipeline-lib # timeout=10 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 Avoid second fetch Checking out Revision 16e9c14a04046c82772c8a815fff8ffc7a9a5a5a (master) > git config core.sparsecheckout # timeout=10 > git checkout -f 16e9c14a04046c82772c8a815fff8ffc7a9a5a5a # timeout=10 Commit message: "v5.87" First time build. Skipping changelog. [Pipeline] Start of Pipeline [Pipeline] echo 初始化ContextFactory [Pipeline] echo 初始化PipelineInfo,ScheduleInfoJson信息 [Pipeline] libraryResource [Pipeline] readYaml [Pipeline] echo pipelineInfoJson start [Pipeline] echo scheduleInfoJson start [Pipeline] echo 初始化配置文件 [Pipeline] libraryResource [Pipeline] libraryResource [Pipeline] echo 初始化参数信息 [Pipeline] echo 初始化日志 [Pipeline] echo 初始化命令行执行模块 [Pipeline] echo 初始化全部步骤属性 [Pipeline] echo type-checkout [Pipeline] echo [INFO][ContentModelFactory]origin tags:[202509291026] [Pipeline] echo [INFO][ContentModelFactory]origin architecturePlatforms:null [Pipeline] echo type-uploadDocker [Pipeline] echo type-deploy [Pipeline] echo nodeType=cloud [Pipeline] echo platform=linux [Pipeline] libraryResource [Pipeline] echo [INFO][context]idleMinutes-15 [Pipeline] podTemplate [Pipeline] { [Pipeline] node Agent dynamiccloud-jmaster-8-kubernetes-ci-v3kbw-wn934 is provisioned from template dynamicCloud-jmaster-8-kubernetes-ci-v3kbw Running on dynamiccloud-jmaster-8-kubernetes-ci-v3kbw-wn934 in /home/jenkins/workspace/console-f83804ea-acee-4106-b342-55cf1173cc67 [Pipeline] { [Pipeline] stage [Pipeline] { (参数检查) [Pipeline] script [Pipeline] { [Pipeline] timestamps [Pipeline] { [Pipeline] echo 2025-09-29 10:27:01 [INFO][参数检查]正在执行 参数检查 [Pipeline] sh [Pipeline] sh [Pipeline] sh [Pipeline] sh [Pipeline] sh [Pipeline] sh [Pipeline] echo 2025-09-29 10:27:03 [INFO][参数检查]参数检查 执行完毕 [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] dir Running in /local/data/share/jmaster-8/shared_work_space/console-f83804ea-acee-4106-b342-55cf1173cc67/code [Pipeline] { [Pipeline] echo step1-branch1-stageGroup1-stage1 [Pipeline] stage [Pipeline] { (代码检出#0#0#0#0) [Pipeline] script [Pipeline] { [Pipeline] timestamps [Pipeline] { [Pipeline] echo 2025-09-29 10:27:03 [INFO][代码检出#0#0#0#0]正在执行 代码检出#0#0#0#0 [Pipeline] dir 2025-09-29 10:27:03 Running in /local/data/share/jmaster-8/shared_work_space/console-f83804ea-acee-4106-b342-55cf1173cc67/code [Pipeline] { [Pipeline] sh 2025-09-29 10:27:04 Cloning into '.'... 帮我分析下这段pod重构日志
最新发布
09-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值