Recall & Review
beginner
What is a Git tag?
A Git tag is a label that points to a specific commit. It helps mark important points like releases or versions in the project history.
Click to reveal answer
beginner
How do you create a lightweight tag on a specific commit?
Use the command
git tag <tagname> <commit-hash>. This creates a simple tag pointing to that commit without extra information.Click to reveal answer
intermediate
What is the difference between lightweight and annotated tags in Git?
Lightweight tags are simple pointers to commits. Annotated tags store extra info like tagger name, date, and message, and are stored as full objects in Git.
Click to reveal answer
intermediate
How do you create an annotated tag on a specific commit?
Use
git tag -a <tagname> <commit-hash> -m "message". This adds a message and extra info to the tag.Click to reveal answer
beginner
How can you push a specific tag to a remote repository?
Use
git push origin <tagname> to send the tag to the remote repository so others can see it.Click to reveal answer
Which command creates a lightweight tag on commit abc123?
✗ Incorrect
Option C creates a lightweight tag named v1.0 on commit abc123.
What extra information does an annotated tag include?
✗ Incorrect
Annotated tags store tagger name, date, and a message along with the commit reference.
How do you push all tags to the remote repository?
✗ Incorrect
The command 'git push origin --tags' pushes all local tags to the remote.
Which command creates an annotated tag with a message?
✗ Incorrect
Option B creates an annotated tag with the message 'release'.
If you want to tag a commit but don’t remember its hash, what can you do?
✗ Incorrect
You can use 'git log' to see commit history and find the commit hash to tag.
Explain how to create and push an annotated tag on a specific commit in Git.
Think about tagging with extra info and sharing it with others.
You got /4 concepts.
Describe the difference between lightweight and annotated tags and when you might use each.
Consider the detail and purpose of the tag.
You got /4 concepts.