Creating Tags
Tags mark specific points in history as important.
Example:
# Create a lightweight tag
git tag tag-name
# Create an annotated tag
git tag -a tag-name -m "Tag message"
Annotated vs Lightweight Tags
Annotated tags store extra metadata, while lightweight tags are just pointers.
Example:
# List all tags
git tag -l
Using Tags for Releases
Tags are often used to mark release points in your project.
Example:
# Push tags to the remote repository
git push origin --tags