tag
-
Create a lightweight tag:
git tag <tag_name> -
Create an annotated tag with a message:
git tag -a <tag_name> -m "Tag message" -
List all tags:
git tag -
Push a specific tag to a remote repository:
git push origin <tag_name> -
Push all tags to a remote repository:
git push --tags -
Delete a local tag:
git tag -d <tag_name> -
Delete a remote tag:
git push origin --delete <tag_name> -
Rename an existing tag:
git tag <new_tag_name> <old_tag_name>
git tag -d <old_tag_name>
git push origin :refs/tags/<old_tag_name>
git push --tags -
Checkout a specific tag (create a detached HEAD):
git checkout <tag_name> -
Show details of a specific tag:
git show <tag_name> -
Create a lightweight tag at a specific commit hash:
git tag <tag_name> <commit_hash> -
Create an annotated tag at a specific commit hash:
git tag -a <tag_name> -m "Tag message" <commit_hash> -
List tags matching a pattern:
git tag -l "<pattern>" -
Verify the GPG signature of a signed tag:
git tag --verify <tag_name> -
Show the commit associated with a specific tag:
git rev-list -n 1 <tag_name>