tldr/pages/common/git-tag.md

29 lines
528 B
Markdown
Raw Normal View History

# git tag
> Create, list, delete or verify tags.
2016-12-15 18:23:45 +03:00
> A tag is a static reference to a specific commit.
- List all tags:
`git tag`
- Create a tag with the given name pointing to the current commit:
`git tag {{tag_name}}`
- Create an annotated tag with the given message:
`git tag {{tag_name}} -m {{tag_message}}`
- Delete the tag with the given name:
`git tag -d {{tag_name}}`
- Get updated tags from upstream:
`git fetch --tags`
2016-12-15 18:23:45 +03:00
2017-01-05 16:05:56 +03:00
- List all tags whose ancestors include a given commit:
2016-12-15 18:23:45 +03:00
2017-01-03 22:32:35 +03:00
`git tag --contains {{commit}}`