Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to delete a local Git tag named 'v1.0'.
Git
git tag [1] v1.0
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -D deletes forcefully, which is not needed here.
Using -r deletes remote tags, not local.
✗ Incorrect
Use -d to delete a local tag safely.
2fill in blank
mediumComplete the command to delete a remote Git tag named 'release-2'.
Git
git push origin [1] :refs/tags/release-2
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' without dashes is invalid.
Using 'remove' or 'rm' are not valid git push options.
✗ Incorrect
Use --delete with git push to remove a remote tag.
3fill in blank
hardFix the error in the command to delete a remote tag named 'beta'.
Git
git push origin [1] beta Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the tag name alone without --delete does not delete the tag.
Using -d is for local tags only.
✗ Incorrect
The correct way to delete a remote tag is using git push origin --delete tagname.
4fill in blank
hardFill both blanks to delete a local tag 'v3.0' and then delete it from the remote named 'origin'.
Git
git tag [1] v3.0 && git push origin [2] v3.0
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -D locally deletes forcefully, which is not always needed.
Using 'remove' is not a valid git option.
✗ Incorrect
Use -d to delete local tags and --delete to delete remote tags.
5fill in blank
hardFill all three blanks to delete a local tag 'test', force delete a local tag 'old', and delete a remote tag 'prod' from 'origin'.
Git
git tag [1] test && git tag [2] old && git push origin [3] prod
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using -r is for remote refs but not for deleting tags.
Confusing -d and -D for local deletes.
✗ Incorrect
Use -d for normal local delete, -D to force delete local tags, and --delete to remove remote tags.