Git & GitHub for Developers Git Tags & Releases
9 / 11
Next
Git Tags & Releases ~10min

Git Tags & Releases

Tags mark specific commits as important milestones, usually software versions. They're the basis of GitHub Releases.

Tagging

# Create a lightweight tag
git tag v1.0.0

# Create an annotated tag (recommended, includes message)
git tag -a v1.0.0 -m "Release v1.0.0, first stable version"

# List all tags
git tag

# Push tags to GitHub (not pushed automatically!)
git push origin v1.0.0   # push one tag
git push origin --tags   # push all tags

# Tag an old commit
git log --oneline        # find the commit hash
git tag -a v0.9.0 a1b2c3d -m "Beta release"

Semantic versioning (SemVer)

MAJOR.MINOR.PATCH   β†’   v2.4.1

MAJOR, breaking change (not backwards compatible)
MINOR, new feature (backwards compatible)
PATCH, bug fix (backwards compatible)

GitHub Releases

A GitHub Release is a tagged version of your code with a description, changelog, and optional downloadable files (installers, binaries, etc.).

  1. On GitHub: Releases β†’ Draft a new release
  2. Choose or create a tag (e.g. v1.0.0)
  3. Write a changelog (what's new, fixed, removed)
  4. Publish release, creates a permanent download link
Tasks
Preview