Create a tag in a GitHub repository

后端 未结 7 1581
逝去的感伤
逝去的感伤 2020-12-02 03:04

I have a repository in GitHub and I need to tag it.
I tagged in a shell, but on GitHub, it is not showing up.

Do I have to do

7条回答
  •  情书的邮戳
    2020-12-02 03:57

    It all depends what type of tag you want to create:

    • If you want to create Annotated tags, to show extra metadata, you can do it in the following way: git tag -a v1.0.0.
    • On the other hand, Lightweight tags are used to "bookmark" your commits for private use: git tag v1.0.0.

    There are a few other tag functionalities such as:

    • Listing tags - git tag -l -n3. The command lists all existing tags with maximum 3 lines of their tag message. By default -n only shows the first line.
    • Tag details - git show . It shows all you need to know about a specific tag.
    • Sorting tags - git tag --sort=
    • Publishing tags - git push origin v1.0. You can git push the tag individually, or you can run git push --tags which will push all tags at once.

    Be sure to check this tag related article for more relevant information.

提交回复
热议问题