๐ŸŽ“ A1Learner
๐Ÿ”
0 of 50 lessons completed

Create a Tag

A tag is a name for one snapshot. It marks a point worth finding again, like a first version.

Mark the snapshot

The tag command prints nothing. The list shows the new tag.

$ git tag v1.0
$ git tag

See what the tag points at

The tag marks the coffee snapshot.

$ git show v1.0 --stat

Example

$ git tag v1.0
$ git tag

Key points

  • Tag with a name marks the newest snapshot.
  • Version names often look like v1.0.
  • The tag command lists every tag you have.
  • A tag points at one snapshot and never moves.
  • Tags are for readers. They say โ€œthis snapshot matteredโ€.
  • A lightweight tag is only a name. It carries no message.

Here, one tag marks the coffee snapshot. The list shows it.

Try it Yourself

Edit the code, then press Run.

Running is simulated

Exercise

What does a tag name?