Recall & Review
beginner
What is a Git tag?
A Git tag is a marker used to label specific points in history as important, often used to mark release versions.
Click to reveal answer
beginner
How do you push a single tag named
v1.0 to a remote repository?Use the command
git push origin v1.0 to push the tag v1.0 to the remote named origin.Click to reveal answer
beginner
How can you push all local tags to the remote repository at once?
Use
git push origin --tags to send all local tags to the remote repository.Click to reveal answer
intermediate
What happens if you try to push a tag that already exists on the remote with different content?
Git will reject the push unless you force it with
git push --force origin <tagname>, but forcing can overwrite history and should be done carefully.Click to reveal answer
beginner
Why might you want to push tags to a remote repository?
Pushing tags shares important points like release versions with others, so everyone can access the same reference points in the project history.
Click to reveal answer
Which command pushes all local tags to the remote repository?
✗ Incorrect
The command
git push origin --tags pushes all local tags to the remote repository.How do you push a single tag named
release-2 to the remote named origin?✗ Incorrect
Use
git push origin release-2 to push a single tag named release-2.What does the command
git push origin --tags do?✗ Incorrect
It pushes all local tags, both annotated and lightweight, to the remote repository.
If a tag already exists on the remote but you want to overwrite it, what should you do?
✗ Incorrect
You can force push a tag with
git push --force origin <tagname>, but it should be done carefully.Why is pushing tags important in a team project?
✗ Incorrect
Pushing tags shares important points like releases so the team can reference the same versions.
Explain how to push a single tag and all tags to a remote repository in Git.
Think about commands that specify a tag name versus commands that push all tags.
You got /2 concepts.
Describe what happens if you try to push a tag that already exists on the remote with different content and how to handle it.
Consider safety and force pushing.
You got /3 concepts.