CS FundamentalsModerateAccenture · Infosys
You create an annotated tag v2.0 locally and run git push. The tag does not appear on the remote. What is correct?
- A. Annotated tags cannot be pushed; only lightweight tags can
- B. git push rejected the tag because it already exists on another branch
- C. Tags are pushed only when the commit they point to is a merge commit
- D. git push does not send tags by default; push it with git push origin v2.0 (or --follow-tags for annotated tags)
Correct answer: D. git push does not send tags by default; push it with git push origin v2.0 (or --follow-tags for annotated tags)
Tags are separate refs and a plain git push sends only branches. Push one tag by name, all tags with --tags, or annotated tags reachable from pushed commits with --follow-tags.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- A file config.env holding a live API key was committed and pushed three weeks ago. The developer now runs git rm --cached config.env, adds…
- How many of these statements about Git's object model are correct? 1. Two files with identical content in different folders are stored as…
- You pushed commit C to a shared branch, then ran git commit --amend to fix its message and tried git push again. What happens and why?
- main has A-B-X, where X was committed after feature branched from B; feature has C-D-E. How many commits are reachable from main after…
- In GitFlow, a critical bug is found in production (main) while develop holds unreleased work. What is the standard handling?
- A team practising trunk-based development wants to merge a half-built feature into main daily without exposing it to users. What makes…