git错误Your configuration specifies to merge with the ref xxxx

在分支master执行git pull的时候,提示错误:

Your configuration specifies to merge with the ref 'refs/heads/release/v20230413.1'
from the remote, but no such ref was fetched.

这个是由于远端的分支已经不存在了,而本地这个分支还保持着跟踪。删除分支跟踪然后删除这个分支即可。

git checkout release/v20230413.1

# 提示
Already on 'release/v20230413.1'
Your branch is based on 'origin/release/v20230413.1', but the upstream is gone. 
(use "git branch --unset-upstream" to fixup)

# unset 掉分支跟踪
git branch --unset-upstream

# 这里就可以正常pull代码了
git checkout master
git pull

# 删除远端不存在的分支
git branch -d release/v20230413.1

至此就可以成功删除这个本地分支了。

git错误Your configuration specifies to merge with the ref xxxx

原文链接:https://beltxman.com/3906.html,若无特殊说明本站内容为 行星带 原创,未经同意禁止转载。

git错误Your configuration specifies to merge with the ref xxxx”上有 2 条评论;

发表评论

您的电子邮箱地址不会被公开。

Scroll to top