What does git push origin --tags do?
a) Pushes all tags to the remote repository
b) Pushes only the latest tag
c) Deletes remote tags
d) Pushes tags and removes untracked files
Answer:
a) Pushes all tags to the remote repository
Explanation:
The git push origin --tags command pushes all tags from your local repository to the remote repository. Tags are not automatically pushed with commits, so this command is necessary to make your tags available on the remote server.
For example, if you’ve created several tags locally and want to share them on GitHub or another remote, you can run git push origin --tags to push them all at once.
This is important when managing versioned releases in a project where tags mark key points like software versions.