0
0
Gitdevops~10 mins

Deleting tags in Git - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete 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'
A-D
B-d
C--delete-remote
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -D deletes forcefully, which is not needed here.
Using -r deletes remote tags, not local.
2fill in blank
medium

Complete 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'
Arm
Bdelete
Cremove
D--delete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' without dashes is invalid.
Using 'remove' or 'rm' are not valid git push options.
3fill in blank
hard

Fix 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'
A--delete
B:refs/tags/beta
C-d
Ddelete
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.
4fill in blank
hard

Fill 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'
A-d
B--delete
C-D
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using -D locally deletes forcefully, which is not always needed.
Using 'remove' is not a valid git option.
5fill in blank
hard

Fill 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'
A-d
B-D
C--delete
D-r
Attempts:
3 left
💡 Hint
Common Mistakes
Using -r is for remote refs but not for deleting tags.
Confusing -d and -D for local deletes.