git tags

Updated: 18 January 2025

Show tags

git tag

Add a tag to current commit

git tag tagname

Add an annotated tag to a specific commit

git tag -a tag_name commit_id -m "message"

Add tag to arbitrary commit

git tag tag-text the-ref

Push tag to remote

git push origin tagname

List tags with date (from Stackoverflow)

git for-each-ref --sort=creatordate --format '%(refname) %(creatordate)' refs/tags

Delete a tag

git tag -d foo-tag

List tags on remote

git ls-remote --tags origin

Leave a comment