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.
Pro Git has an almost complete tag overview. You can take a look at “Sharing Tags” section in this chapter :
http://progit.org/book/ch2-10.html
Thanks, very usable. Just the info I was looking for. I was surprised that it isn’t handled in the book “Pragmatic Guide to Git”
Thank you for the excellent quick reference
Thanks a lot for this, none of the other tag tutorials, even the documentation tell you this.