0
0
Gitdevops~5 mins

Deleting tags in Git - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
How do you delete a local Git tag named v1.0?
Use the command git tag -d v1.0 to delete the local tag named v1.0.
Click to reveal answer
beginner
How do you delete a remote Git tag named v1.0?
Use the command git push origin --delete tag v1.0 to delete the remote tag named v1.0.
Click to reveal answer
beginner
What happens if you delete a local tag but not the remote tag?
The tag will be removed from your local repository but will still exist on the remote repository for others to fetch.
Click to reveal answer
beginner
Why might you want to delete a Git tag?
You might delete a tag if it was created by mistake or points to the wrong commit.
Click to reveal answer
beginner
What is the difference between deleting a tag locally and deleting it remotely?
Deleting locally removes the tag only from your computer. Deleting remotely removes it from the shared repository so others won’t see it.
Click to reveal answer
Which command deletes a local Git tag named release?
Agit push origin --delete tag release
Bgit remove tag release
Cgit delete tag release
Dgit tag -d release
How do you delete a remote tag named v2.0?
Agit push origin --delete tag v2.0
Bgit delete remote v2.0
Cgit remove remote tag v2.0
Dgit tag -d v2.0
If you delete a tag locally but not remotely, what happens?
AThe tag is deleted everywhere
BThe tag remains on the remote repository
CThe tag is deleted only on other computers
DThe tag is deleted from the remote but not locally
Which of these is NOT a valid reason to delete a Git tag?
ATag was created by mistake
BTag points to the wrong commit
CTo free up disk space
DTo clean up outdated tags
What does the command git tag -d do?
ADeletes a local tag
BDeletes a remote tag
CDeletes all tags
DDeletes a branch
Explain how to delete a Git tag both locally and remotely.
Think about two steps: one on your computer, one on the shared server.
You got /2 concepts.
    Why is it important to delete tags from the remote repository after deleting them locally?
    Consider what happens when others fetch from the remote.
    You got /3 concepts.