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. Everything you do stays in this browser unless you switch on sync.Part of liter8.sh · v0.5.2 · Report an issue