World map

 

BM: Baca dalam Bahasa Melayu

World 6: Team Workflows

Conventional Commits, SemVer, changelogs

You will learn: how commit labels decide the next version and the changelog.

The problem

git log with four vague messages: more changes, fix things, update and stuff. Terminal output: $ git log --oneline 1f79006 (HEAD -> main) more changes 9777ca8 fix things abde5b4 update bfd1320 stuff

Release day! Users ask what changed. Is it a big update or a small fix? This log will not tell you.

Watch

Tap each point on the timeline.

Semantic Versioning (SemVer): Version numbers in three parts: MAJOR.MINOR.PATCH. (SemVer) uses three numbers: MAJOR.MINOR.PATCH. Each one tells users how big the change is.

Try it

Conventional Commits: A simple style for messages: feat:, fix:, docs: and more. labels match those numbers. fix: means PATCH. feat: means MINOR. Tap every commit that adds a feature.

Tap every commit that adds a feature.

~/kopi $ git log --oneline

0 of 2 found

Try it

Which number does each commit bump?

Drag a card into a box. Or tap the card, then tap the box.

        Predict

        Version 2.4.1 is live. Since then: two fix: commits and one feat:. What comes next?

        Pick one answer.

        Try it

        A changelog: A list of the changes in each version, written for people. lists changes for people. The newest version goes on top. Changes are grouped, like Added and Fixed. Tap every fix.

        Tap every fix in this changelog.

        0 of 2 found

        Check

        Put these versions in order, newest at the top.

        Newest at the top. Put these in order. Use the arrows, or drag.

        • 1.12.0
        • 2.9.1
        • 3.0.0
        • 2.10.0
        • 2.9.0

        You did it!

        You can now turn commit labels into versions and a changelog.

        Go deeper (optional)

        Tools can read Conventional Commits for you. They pick the next version and draft the changelog. A footer that starts with BREAKING CHANGE: also means MAJOR. Versions below 1.0.0 are for early work: anything may change. A tag like v2.5.0 adds a v, but the version is 2.5.0.