For some reason I haven’t been able to find any good
git-tag examples online. The best example I can find anywhere is on page 43 of Jon Loeliger’s Version Control with Git, and even that example is arguably incomplete. Here’s the example from the book:
$ git tag -m"Tag version 1.0" V1.0 3ede462
Now you have a tag. But if you do a push and then, on a different clone, do a pull and run
git tag, the tag won’t show up. Why not? You need to push it, but the book doesn’t tell you how (at least not right there in the same example). Here’s what you need to run to push the tag:
$ git push --tags Counting objects: 1, done. Writing objects: 100% (1/1), 189 bytes, done. Total 1 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (1/1), done. To /var/git/mcif.git/ * [new tag] V1.0 -> V1.0
Now we see something happen.
It also may be good to know that you can run
git-show V1.0 to see details about this tag.