git 如何从远程存储库中删除标签

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6151970/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 11:01:13  来源:igfitidea点击:

How do you remove a tag from a remote repository

git

提问by serby

Is it possible to untag a revision that has been push upstream using git.

是否可以取消标记已使用 git 推送到上游的修订版。

This is what has happened:

这是发生的事情:

 git tag 1.1
 git push --tags origin master

Doh! That was meant to be version 1.1beta

哦!这本来是 1.1beta 版

Can you rebase and repush upstream. No other member of my team has pulled from origin yet.

您可以重新设定基准并重新推送上游吗?我的团队中还没有其他成员从原点撤回。

回答by Abizern

You can delete a remote tag the same way that you delete a remote branch.

您可以像删除远程分支一样删除远程标记。

git push origin :1.1

And delete your local tag with:

并删除您的本地标签:

git tag -d 1.1

回答by Flimm

git push --delete origin TAGNAME

Of course, you still have to delete the tag locally by running:

当然,您仍然必须通过运行在本地删除标签:

git tag -d TAGNAME