Git & GitHub Interview Question #63
How do you push tags to a remote repository?
Undo & Recovery, Tags, Forks, Pull Requests & Code Review Mid-Level Intermediate
Quick Interview Answer
Normal branch pushes do not necessarily publish all local tags. A specific tag can be pushed by name, or multiple tags can be pushed with the appropriate option.
Detailed Explanation
Normal branch pushes do not necessarily publish all local tags. A specific tag can be pushed by name, or multiple tags can be pushed with the appropriate option.
Teams should publish only intended release tags and follow repository conventions, especially when automated release workflows react to tags.
Code Example
# Push one tag
git push origin v1.0.0
# Push all local tags
git push origin --tags