How to create lightweight tags in Git

Lightweight tags in Git provide a simple way to mark specific commits without storing additional metadata, making them perfect for temporary or internal version references. With over 25 years of version control experience and as the creator of CoreUI, I use lightweight tags for development milestones and quick commit references. The most straightforward approach is using the basic git tag command without any flags to create a simple pointer to a commit. This provides fast, lightweight version marking without the overhead of annotated tags and their associated metadata.

Use git tag without any flags to create lightweight tags that simply point to specific commits without additional metadata.

# Create lightweight tag for current commit
git tag v1.0.0

# Create lightweight tag for specific commit
git tag v0.9.0 abc123f

# Create lightweight tag with different name format
git tag release-candidate-1

# View lightweight tag information
git show v1.0.0

# List all lightweight and annotated tags
git tag --list

Lightweight tags are simply pointers to specific commits stored as references in .git/refs/tags/. Unlike annotated tags, they don’t contain tagger information, creation date, or messages. The git show command on a lightweight tag displays the commit it points to rather than tag metadata. They’re ideal for temporary markers, development builds, or situations where you need quick commit references without additional overhead.

Best Practice Note:

This lightweight tagging approach is used in CoreUI’s development workflow for quick milestone marking and build references. Use lightweight tags for temporary or internal versioning, but prefer annotated tags for official releases that need proper documentation and metadata.


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.
How to return multiple values from a JavaScript function
How to return multiple values from a JavaScript function

How to compare dates with JavaScript
How to compare dates with JavaScript

How to conditionally add attributes to React components
How to conditionally add attributes to React components

How to Remove Underline from Link in CSS
How to Remove Underline from Link in CSS

Answers by CoreUI Core Team