2016/01/14 start learning git: Tag management: Manipulating tags

Source: Internet
Author: User

First, delete the local label

If the label is wrong, you can delete it:git tag-d v0.1

Because the created labels are stored only locally, they are not automatically pushed to the remote.
Therefore, the wrong tag can be safely deleted locally.

Second, push the label
If you want to push a tag to a remote, use the command GIT push Origin <tagname>:
git push Origin v1.0
Or, all-in-one push is not yet pushed to the remote local label:
Git push Origin--tags

Third, remove the remote label
If the label has been pushed to the remote, it would be a little trouble to remove the remote label.
Delete from local:git tag-d v0.9
Then, remove from remote. The Delete command is also push, but the format is as follows:
git push origin:refs/tags/v0.9


Summary

Command GIT push origin <tagname> can push a local tag;

Command GIT push origin--tags to push all the local tags that have not been pushed;

Command git tag-d <tagname> can delete a local tag;

Command git push origin:refs/tags/<tagname> to delete a remote tag.

2016/01/14 start learning git: Tag management: Manipulating tags

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.