2015-12-18 05:04:11 +03:00
|
|
|
# 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.
|
2015-12-18 05:04:11 +03:00
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- List all tags:
|
2015-12-18 05:04:11 +03:00
|
|
|
|
|
|
|
`git tag`
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Create a tag with the given name pointing to the current commit:
|
2015-12-18 05:04:11 +03:00
|
|
|
|
|
|
|
`git tag {{tag_name}}`
|
|
|
|
|
2018-01-10 13:52:20 +03:00
|
|
|
- Create a tag with the given name pointing to a given commit:
|
|
|
|
|
|
|
|
`git tag {{tag_name}} {{commit}}`
|
|
|
|
|
2016-01-13 14:32:49 +03:00
|
|
|
- Create an annotated tag with the given message:
|
2015-12-18 05:04:11 +03:00
|
|
|
|
|
|
|
`git tag {{tag_name}} -m {{tag_message}}`
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Delete the tag with the given name:
|
2015-12-18 05:04:11 +03:00
|
|
|
|
|
|
|
`git tag -d {{tag_name}}`
|
2016-10-27 07:55:22 +03:00
|
|
|
|
|
|
|
- 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}}`
|