Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 1.54 KB

tags.md

File metadata and controls

74 lines (56 loc) · 1.54 KB

Git Tags

Tags are pointers to specific points in Git history. They are usually used to mark release versions (e.g. v1.0.0).

Create an annotated tag

An annotated tag stores extra metadata like the tagger name, email, and date.

git tag -a $tag_name -m "$message" $commit

List all tags

git tag -l

Delete a local tag

Tags don't get deleted automatically if you delete them on the remote. Use this to clean up old or mistakenly created tags locally.

git tag -d $tag

Verify a signed tag

If a tag is signed with GPG, you can verify the signature to ensure it came from a trusted source.

git tag -v $tag

Push a tag to remote

Tags are not pushed to remotes by default when you run git push. You must explicitly push them.

git push $remote $tag

Delete a remote tag

If you accidentally pushed a tag, you must delete it from the remote server explicitly.

git push $remote --delete $tag