I have cloned a remote Git repository to my laptop, then I wanted to add a tag so I ran
git tag mytag master
When I run git tag
To expand on Trevor's answer, you can push a single tag or all of your tags at once.
git push
This is a summary of the relevant documentation that explains this (some command options omitted for brevity):
git push [[[ …]] ... The format of a
parameter is…the source ref, followed by a colon:, followed by the destination ref…The
tells which ref on the remote side is updated with this push…If:is omitted, the same ref aswill be updated…tag
means the same asrefs/tags/.:refs/tags/
git push --tags
# Or
git push --tags
Here is a summary of the relevant documentation (some command options omitted for brevity):
git push [--all | --mirror | --tags] [[ …]] --tags All refs under
refs/tagsare pushed, in addition to refspecs explicitly listed on the command line.