Skip to content
Guest
Learn Git · Course Syllabus Show lessons
Intermediate Git · 7 min read · Beginner

Tags & Semantic Versioning

Mark production releases with annotated Git tags (v1.2.0) and follow SemVer (MAJOR.MINOR.PATCH).

What you'll learn

  • Understand Semantic Versioning (MAJOR.MINOR.PATCH)
  • Create annotated release tags with git tag -a
  • Push tags to GitHub using git push origin v1.0.0

Git tags pin human-readable release names like v1.0.0 or v2.3.1 to specific commits. Unlike branches, tags do not move as new commits are added.

Semantic Versioning (SemVer)

  • MAJOR (2.0.0): Breaking API changes.
  • MINOR (1.3.0): Backward-compatible new features.
  • PATCH (1.2.1): Backward-compatible bug fixes.

Fill-in-the-Blank Exercise

Create & Push an Annotated Tag

Create an annotated tag v1.0.0 and push it to origin.

git  -a v1.0.0 -m "Release v1.0.0"
git push origin 

Interactive Git Sandbox

GitPrepare a Tagged Release
main
(main) $ git status
On branch main
Untracked files: index.html, styles.css

Check Your Understanding

Score: 0 / 1

1. Under Semantic Versioning, which version number increments when you add a backward-compatible new feature?

Study Workspace

Finished this lesson?

Your progress is saved locally in your browser, no account needed.

Search courses, lessons, and references

Type to search across all courses, lessons, and quick references.

Press Esc to close Powered by Pagefind