Git Tags用法

List all tags

To list all tags, use the following command.

git tag

Creating Tags

Git uses two main types of tags: lightweight and annotated.

lightweight tag

git tag <tagname>  

annotated tag

To create an annotated tag in Git you can just run the following simple commands on your terminal.

$ git tag -a v2.1.0 -m "xxx feature is released in this tag."
$ git tag
v1.0.0
v2.0.0
v2.1.0

Push Tag

To push particular tag you can use below command:

git push origin v1.0.9
本文由 络壳 原创或整理,转载请注明出处