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?

  1. A. Annotated tags cannot be pushed; only lightweight tags can
  2. B. git push rejected the tag because it already exists on another branch
  3. C. Tags are pushed only when the commit they point to is a merge commit
  4. 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.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic