AI Hints
Home›Git & GitHub Tutorial›Tags, Blame and Bisect
Git & GitHub · Lesson 92 of 144

Tags and Releases

Naming versions.

⏱ 2 min read▶ Video at 1:40:27🎓 Free
Watch this lesson in the Git & GitHub courseWatch on YouTube ↗Full Git & GitHub course

Some commits are special. Version one point oh, the day your site went live. A tag is a permanent name you stick on one commit. Unlike a branch, it never moves.

Tags and Releases
From the video: Tags and Releases
  • Some commits are milestones
  • A tag names one commit
  • It never moves

Creating tags

Git tag, dash a, v one point one, with dash m and a message. Dash a makes an annotated tag, with a message, an author and a date. That's the kind to use for releases. Git tag on its own lists all tags. And git show displays the tag, and the commit it points to.

git
git tag -a v1.1 -m "Blog announcement"
git tag
v1.0
v1.1
git show v1.1 --stat
tag v1.1
Tagger: Sam Lee <sam@example.com>
Date:   Mon Jan 5 09:38:49 2026 +0000

Blog announcement

commit 9a985cd946dfb6492b8192735cb1000a16531fc4 (HEAD -> main, tag: v1.1)
Author: Sam Lee <sam@example.com>
Date:   Mon Jan 5 09:36:32 2026 +0000

    Announce the blog

 index.html | 1 +
 1 file changed, 1 insertion(+)

Sharing tags

Tags aren't pushed automatically. You push them by name, with git push origin, and the tag. On GitHub, you can turn a tag into a release, with notes and downloadable files, from the releases section.

git
git push origin v1.0 v1.1
To https://github.com/sam/my-site.git
 * [new tag]         v1.0 -> v1.0
 * [new tag]         v1.1 -> v1.1

Version numbers

Most projects use semantic versioning. Three numbers, major, minor, and patch. Bump the patch for bug fixes. Bump the minor for new features that don't break anything. And bump the major for big changes that might break things for users.

keyvalue
v1.4.2major.minor.patch
Patchbug fixes
Minornew features
Majorbreaking changes

Summary

Git tag dash a creates a named version, and git push origin pushes it. Use major, minor, patch numbers. Next, finding out who wrote a line, and why.

Key takeaways
  • git tag -a v1.0 -m "msg"
  • git push origin v1.0
  • Releases on GitHub
Next up: Who Changed This Line? — git blame