Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to create a new Git tag named v1.0.0.
Git
git tag [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using tag names without the 'v' prefix.
Using non-numeric or unclear tag names.
✗ Incorrect
The correct tag format for semantic versioning is v1.0.0.
2fill in blank
mediumComplete the command to push the tag v2.1.0 to the remote repository.
Git
git push origin [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Pushing a branch name instead of a tag.
Forgetting to push tags after creating them.
✗ Incorrect
To push a specific tag, use its exact name, here v2.1.0.
3fill in blank
hardFix the error in the command to list all tags sorted by version.
Git
git tag --sort=[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'date' or 'name' which do not sort by semantic version.
Misspelling the sort option.
✗ Incorrect
The correct sort option to order tags by semantic version is version.
4fill in blank
hardFill both blanks to create an annotated tag with message 'Release 3.0.0'.
Git
git tag -a [1] -m [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using lightweight tags without messages.
Forgetting quotes around the message.
✗ Incorrect
Annotated tags use -a with the tag name and -m with a quoted message.
5fill in blank
hardFill all three blanks to delete a local tag and then delete it from the remote.
Git
git tag -d [1] && git push origin :refs/tags/[2] && git fetch --prune origin [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using different tag names in each command.
Forgetting to delete the tag remotely.
✗ Incorrect
To delete a tag locally and remotely, use the same tag name in all commands.