Skip to content
History

Tags

A name that does not move.

A branch moves as you commit. A tag does not. That is the entire difference, and it is why tags are used for releases: `v1.0` should mean one commit forever.

Because a tag is just another ref, it resolves anywhere a branch would — `git show v1.0`, `git diff v1.0..HEAD`, `git checkout v1.0`.

A tag also outranks a branch of the same name when git resolves a bare word, which is a good reason not to have both.

Commands in this lesson

git tag
Give a commit a name that will not move
No account, no backend. Everything you do stays in this browser.liter8.sh