Challenge - 5 Problems
Tag Push Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of pushing a single tag to remote?
You have created a tag named
v1.0 locally. You run the command git push origin v1.0. What will be the output?Git
git push origin v1.0
Attempts:
2 left
💡 Hint
Think about what happens when you push a specific tag name to the remote.
✗ Incorrect
The command pushes the tag named v1.0 to the remote named origin. The output confirms the new tag was pushed.
💻 Command Output
intermediate2:00remaining
What happens when pushing all tags to remote?
You run
git push origin --tags to push all tags. What is the expected output if there are two new tags v1.1 and v1.2?Git
git push origin --tagsAttempts:
2 left
💡 Hint
The --tags option pushes all tags that are not yet on the remote.
✗ Incorrect
The command pushes all local tags that the remote does not have. The output lists each new tag pushed.
❓ Troubleshoot
advanced2:00remaining
Why does pushing a tag fail with 'src refspec' error?
You run
git push origin v2.0 but get the error: error: src refspec v2.0 does not match any. What is the most likely cause?Attempts:
2 left
💡 Hint
Check if the tag you want to push exists locally.
✗ Incorrect
The error means git cannot find a local tag named v2.0 to push.
✅ Best Practice
advanced2:00remaining
Which command pushes tags but excludes annotated tags?
You want to push only lightweight tags to the remote, excluding annotated tags. Which command achieves this?
Attempts:
2 left
💡 Hint
Consider how git treats tags when pushing.
✗ Incorrect
Git does not differentiate tag types when pushing; --tags pushes all tags.
🔀 Workflow
expert3:00remaining
Order the steps to push a new tag and verify it on remote
Arrange these steps in the correct order to create a tag named
release-1.0, push it to remote, and verify it exists remotely.Attempts:
2 left
💡 Hint
You must be on the right branch before tagging, then push, then verify.
✗ Incorrect
First checkout the branch, then create the tag, push it, and finally verify on remote.