AlgoMaster Logo

Tagging - Quiz

1 min readUpdated December 2, 2025
Listen to this chapter
Unlock Audio

Tagging Exercises

30 quizzes

1
Code Completion

Create an annotated tag for the current commit with a message describing a release

shell
1
git tag -a v2.0.0 - "Release v2.0.0"

Click an option to fill the blank:

2
Code Completion

Create a lightweight tag on the current commit to mark an internal test build

shell
1
git test-build-2025-01-01

Click an option to fill the blank:

3
Code Completion

Send a single release tag named v1.2.0 to the remote named origin so your team can use it

shell
1
git push origin

Click an option to fill the blank:

4
Code Completion

Remove an incorrect local tag called v0.9.0 from your repository

shell
1
git tag - v0.9.0

Click an option to fill the blank:

5
Code Completion

Check out the code exactly as it was when you created the v1.0.0 release tag

shell
1
git v1.0.0

Click an option to fill the blank:

6
Multiple Choice

Why are annotated tags generally preferred for production releases?

7
Multiple Choice

Which command pushes all locally created tags to the remote named origin?

8
Multiple Choice

You need to remove a mistaken tag v3.0.0 from the shared remote. What must be true before you run the remote deletion command?

9
Multiple Choice

After running git checkout v1.0.0, what is the main risk if you start committing immediately?

10
Multiple Choice

In Semantic Versioning, which change should trigger a MAJOR version bump?

11
Sequencing

Order the steps to create, annotate, and push a new release tag v1.5.0 for the current main branch state.

Drag and drop to reorder, or use the arrows.

12
Sequencing

Order the steps to fix a wrong remote tag v2.0.0 by repointing it to the latest main and sharing it.

Drag and drop to reorder, or use the arrows.

13
Sequencing

Order the steps to inspect an old release by tag and then safely continue work from a new branch.

Drag and drop to reorder, or use the arrows.

14
Sequencing

Order the steps to prepare a pre-release using Semantic Versioning and tag it.

Drag and drop to reorder, or use the arrows.

15
Output Prediction

Assume your current directory is a Git repo with a single tag v1.0.0 on the current commit. What is the exact output of this command?

1git tag
16
Output Prediction

You created an annotated tag v2.3.1 with message "Release 2.3.1". What single line does this command print?

1git show -s --format=%D v2.3.1
17
Output Prediction

You are currently on branch main. What single line will this command output?

1git describe --tags --exact-match
18
Output Prediction

You have an annotated tag v1.0.0 on commit abc1234. What is the single-line output of this command?

1git rev-parse v1.0.0^{commit}
19
Bug Spotting

You want to create a v1.0.0 release tag on main and push it. Which line is incorrect?

Click on the line(s) that contain the bug.

shell
1
git checkout main
2
git pull origin main
3
git tag v1.0.0 -m "Release v1.0.0"
4
git push origin v1.0.0
20
Bug Spotting

You tried to delete a tag v0.1.0 locally and on origin. Identify the incorrect command.

Click on the line(s) that contain the bug.

shell
1
git tag -d v0.1.0
2
git push origin v0.1.0 --delete
3
git tag
21
Bug Spotting

You want to inspect the commit tagged v1.2.3. Find the incorrect line.

Click on the line(s) that contain the bug.

shell
1
git fetch --tags
2
git checkout -b v1.2.3
3
git show v1.2.3
22
Matching

Match each Git tag command with its purpose.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

23
Matching

Match each Semantic Version segment with the type of change.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

24
Matching

Match each tag-related concept with the best description.

Click an item on the left, then click its match on the right. Click a matched item to unmatch.

25
Fill in the Blanks

Complete the commands to delete a mistaken local tag and then delete it from origin.

shell
1
git tag - old-tag
2
git push origin -- old-tag

Click an option to fill blank 1:

26
Fill in the Blanks

Complete the commands to create and push an annotated tag v3.1.0 with a release message.

shell
1
git tag - v3.1.0 -m "Release v3.1.0"
2
git push v3.1.0

Click an option to fill blank 1:

27
Fill in the Blanks

Complete the commands to list and check out a tag that matches v2.*.

shell
1
git tag - "v2.*"
2
git checkout

Click an option to fill blank 1:

28
Hotspot Selection

Select the line that shows the tag name pointing to the commit.

Click on the line to select.

shell
1
commit 4f2c9a1b7e3f9d6c5b8a1e2d3c4b5a697887766
2
Author: Dev Example <dev@example.com>
3
Date:   Mon Nov 4 10:20:30 2024 +0000
4
 
5
tag v1.4.0
6
 
7
    Release v1.4.0
29
Hotspot Selection

Select the line that indicates you are in a detached HEAD state at tag v2.0.0.

Click on the line to select.

shell
1
HEAD detached at v2.0.0
2
nothing to commit, working tree clean
30
Hotspot Selection

Select the line that contains the Semantic Version tag for the latest release.

Click on the line to select.

shell
1
  hotfix-temp
2
  v1.9.0-rc.1
3
* v2.0.0
4
  v2.1.0-beta.1