DevPath · Learn to code ESPTEN

Git and teamwork

Versions, releases, and monorepos

Tags and releases

A tag is a fixed label that marks a specific commit, usually to point at a published version. Unlike a branch, it doesn't move.

git tag v1.4.0                 # lightweight tag on the current commit
git tag -a v1.4.0 -m "Release 1.4.0"   # annotated tag (with author and message)
git push origin v1.4.0         # publish the tag (push doesn't send tags by default)
git push origin --tags         # publish all tags

A release is the formal publication of a version: the tag + change notes (changelog) + artifacts (binaries, packages). On GitHub it's created from a tag.

Semantic versioning (SemVer)

SemVer assigns each version three numbers: MAJOR.MINOR.PATCH (e.g. 2.4.1). Each one communicates the type of change:

Change Example Bump
Breaks the API You remove a required parameter MAJOR
Adds without breaking New optional method MINOR
Fixes a bug You correct a calculation PATCH
~1.2.3  -> allows PATCH:  >=1.2.3 <1.3.0
^1.2.3  -> allows MINOR:  >=1.2.3 <2.0.0   (default in npm)

It fits with Conventional Commits: fix: -> PATCH, feat: -> MINOR, feat!: / BREAKING CHANGE -> MAJOR.

Monorepo vs polyrepo

my-monorepo/
├── package.json        # workspaces
├── apps/
│   ├── web/
│   └── api/
└── packages/
    ├── ui/
    └── utils/

There's no universal "winner": the monorepo shines when the packages are tightly coupled and are versioned/deployed together; the polyrepo, when they are independent and managed by separate teams.

Put this into practice

DevPath is a hands-on course: you read the theory here; in the app you put it into practice with exercises that really run, offline.

Start free in the app →
← Teamwork: PRs, review, and conventionsView the module →