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 tagSee what the tag points at
The tag marks the coffee snapshot.
$ git show v1.0 --statExample
$ git tag v1.0
$ git tagKey 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?