How to create annotated tags in Git

Annotated tags in Git store additional metadata including tagger information, date, and optional messages, making them ideal for formal releases and version tracking. As the creator of CoreUI with over 25 years of version control experience, I use annotated tags exclusively for all official releases and major milestones. The most effective approach is using the -a flag with descriptive messages that explain the release contents and changes. This provides a complete audit trail and professional version management for production releases.

Use git tag -a with a descriptive message to create annotated tags that store metadata and release information.

# Create annotated tag with message
git tag -a v1.2.0 -m "Release version 1.2.0 - Added new dashboard components"

# Create annotated tag with multi-line message
git tag -a v1.2.0 -m "Release version 1.2.0

Features:
- New dashboard widgets
- Improved mobile responsiveness
- Bug fixes for IE11 compatibility"

# Create annotated tag for specific commit
git tag -a v1.1.5 -m "Hotfix release" 9fceb02

# Create signed annotated tag
git tag -a v1.2.0 -s -m "Signed release v1.2.0"

Annotated tags created with -a store the tagger’s name, email, date, and the tag message in Git’s object database. The -m flag allows you to specify the message inline, or omit it to open your default editor for longer messages. You can tag specific commits by providing the commit hash, and use -s flag for GPG-signed tags for additional security verification.

Best Practice Note:

This is the standard tagging approach used in CoreUI’s release workflow for professional version management. Always use annotated tags for releases as they provide complete metadata, work better with semantic versioning tools, and can be GPG-signed for security verification.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author

Subscribe to our newsletter
Get early information about new products, product updates and blog posts.

Answers by CoreUI Core Team