Tags
A branch is a name that follows you — commit again and it moves forward. Sometimes you want the opposite: a name that stays put.
A tag marks one commit permanently. v1.0 should mean the same commit next year as it does today, which is why nothing you do afterwards moves it.
Tags are shown in green with a ⌂ marker so they read differently from branches. You can check one out like any other name — and because it is not a branch, doing so detaches HEAD.
Exercises
- Exercise 1. Mark the current commit as "v1" — then notice, on the graph, that it sits alongside main rather than replacing it.
- Exercise 2. You forgot to tag the release two commits ago. Tags take a revision, so mark it now without moving anything.
- Exercise 3. v1 already marks the current commit. Commit once more and watch what happens: main advances, v1 does not. That difference is the whole point.