CodeBlanks Logo Icon CodeBlanks

Summary - Tag

Combine the tag flow to mark a release point.

Release Tagging Workflow

When a release is ready, you can mark its commit with a tag. An annotated tag lets you store a message and additional metadata about the release.

git tag -a v2.0.0 -m "Version 2.0.0"
git push origin v2.0.0

After pushing the tag to the remote repository, other team members can access this release marker.

Practice Create and Push a Release Tag

Store the release commands in a JavaScript array in the correct order: first git tag -a v3.0.0 -m "Major release", then git push origin v3.0.0. Print the commands in order using forEach.

Starter code

terminal
const releaseCommands = [
    // Etiket oluşturma ve gönderme komutlarını ekle
];

// Komutları sırayla yazdır

Sample solution

terminal
const releaseCommands = [
    "git tag -a v3.0.0 -m \"Major release\"",
    "git push origin v3.0.0"
];

releaseCommands.forEach(command => console.log(command));

Expected output

git tag -a v3.0.0 -m "Major release"
git push origin v3.0.0

Questions and answers

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

1 Which tag type stores an annotation message and additional metadata about a release?

  • Local-only
  • Annotated Correct answer
  • Lightweight
  • Temporary

Explanation: An annotated tag contains extra metadata such as a message and tagger information. It is suitable for documenting release points.

2 Mark a Release with an Annotated Tag

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

Explanation: The -a option creates an annotated tag named v3.0.0, and -m adds the release description.

3 Match Release Publishing Steps

Term Meaning
git tag -a Creates an annotated release tag
-m Adds the release message
git push origin v3.0.0 Pushes a specific tag to the remote
git push --tags Pushes all local tags

All lessons in Intermediate

20 Intermediate final

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