gpt4 book ai didi

git - 如何删除使用标签命名的 git 远程分支?

转载 作者:太空狗 更新时间:2023-10-29 14:39:32 25 4
gpt4 key购买 nike

我推错了一个标签名v2.3,我已经有了分支名v2.3。当我尝试删除分支 v2.3 时:

git push origin :v2.3

它说,

qty:ibt-common qrtt1$ git push origin :v2.3 :v2.3_working
error: dst refspec v2.3 matches more than one.
error: failed to push some refs to 'git@github.com:mygit/common.git'

命名冲突时是否可以删除分支?

最佳答案

您可以像这样消除 refspec 的歧义:

git push origin :refs/heads/branchname

更多信息 in this question .

关于git - 如何删除使用标签命名的 git 远程分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15285843/

25 4 0