git Delete remote/local tag

Source: Internet
Author: User

Git's tag function is very convenient for us to find a version, but often sometimes the wrong tag, and upload to remote, then how to delete it.

What we used to do in Windows is tortoisegit, he can delete the local tag, but I'm sorry I didn't find him removing the remote tag again, and it seems to be only for Gitbash.

Gitbash does have the delete local/remote tag command. Below is a list of the commands to delete local and remote tags:

Delete local tag "vxxxx"

#del local tag
git tag-d vxxxx
#list local tag
git tag
Delete remote Tag "vxxxx"

git push origin:refs/tags/vxxxx

It's the right

git push Where-to-push source-ref:destination-ref

Git push Origin refs/tags/release-1.0:refs/tags/release-1.0

That is, using the empty tag to replace the remote tag vxxxx




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.