Sikau

Git & GitHub · Day 17 · about 20 min

Releases and great history

Tags, versions and commit messages that help.

Version 1.0!

Launch day. You want to mark exactly which commit went live, so you can always find it again. That's a tag. And a history full of clear messages turns git log into a story anyone can follow.

Tags and messages

git tag v1.0.0
git tag
echo "<footer>© Himalayan Café</footer>" > footer.html
git add .
git commit -m "Add footer with copyright"
git tag v1.1.0
git log --oneline
  • Push tags with git push origin v1.0.0 (or --tags); GitHub can turn them into Releases.
  • Message subject: imperative, under ~50 characters — "Fix checkout total rounding".
  • For bigger changes, add a body (a second -m) explaining *why*.
  • Many teams use prefixes such as feat:, fix: and docs: (Conventional Commits).

The rest of this lesson

  • History as documentationexplain
  • Semantic versioningexplain
  • Which version?predict
  • Which version bump?match
  • Your turnwrite code
  • Badge quizquiz
  • What you learnedrecap

Continue this lesson free — run real code in your browser

Continue with Google

See all 18 lessons of Git & GitHub