CodeBlanks Logo Icon CodeBlanks

Tag a release

Mark a release point with an annotated tag.

Marking a release with an annotated tag

An annotated tag is a Git tag with additional information that marks a specific commit as a release point. Unlike a lightweight tag, it contains extra details such as a tag message, creator, and date. It is commonly created during release preparation using the -a option.

git tag -a v1.0.0 -m "Version 1.0.0"

Release version and tag message

Tag names commonly use version numbers such as v1.0.0. The -m option adds a message explaining why the tag was created. You can inspect the tag you created with the git show v1.0.0 command.

git tag -a v1.2.0 -m "First stable release"
git show v1.2.0

Practice Create a release tag

Create an annotated tag named v2.1.0. Set its message to Stable version 2.1.0. Write the complete command.

Starter code

terminal
# Annotated tag oluştur

Expected output

Etiket başarıyla oluşturuldu.

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which command creates a release tag with an annotation message?

  • git branch -a v1.0.0
  • git commit -m "v1.0.0"
  • git tag -a v1.0.0 -m "Version 1.0.0" Correct answer
  • git tag v1.0.0

Explanation: -a creates an annotated tag, while -m specifies its annotation message.

2 Define the tag message

Question
git tag -a v2.0.0 -m "____"
Answer
git tag -a v2.0.0 -m "Major release"

Explanation: The tag message is written in quotation marks after the -m option.

3 Annotated tag components

Term Meaning
-a Creates an annotated tag
-m Specifies the tag message
v2.0.0 Release tag name
git show Displays tag information

All lessons in Intermediate

20 Intermediate final

  1. Branch management
  2. Rebase
  3. Conflict
  4. PR flow