Skip to content
Justice Tech School

Lightweight Tags

Tags name a commit, such as a release. Lightweight tags are just names and annotated tags carry a message.

Example
echo one > a.txt && git add a.txt && git commit -qm 'first'
git tag v1.0
git tag -a v1.1 -m 'Release 1.1'
git tag
git show v1.1 --format=%s -s | tail -n 1

Result

v1.0
v1.1
first

Exercise

Create a tag.

git  v1.0

Quiz Test

Why tag commits?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.