Marking Releases With Git
Overview[edit]
Using the git tag command to mark releases. [1]
Listing tags[edit]
git taglists existing tagsgit tag -l v1.8.*searches existing tags using a pattern
Annotated tags[edit]
- "Lightweight tags" are pointers to specific commits and don't do much else.
- "Annotated tags" are required to mark a version in the repo, and on GitHub.
$ git tag -a v1.4 -m "my version 1.4" $ git tag v0.1 v1.3 v1.4
-aindicates an annotated tag-mis the message to store with the tag
git show v1.4 will display all the data associated with the tag
Tags can be added after the fact using the checksum of a commit, e.g. git tag -a v1.2 9fceb02
Pushing tags to GitHub[edit]
Tags are not automatically sent along when pushing a branch. For example they will not show up on GitHub until they are manually pushed, e.g. git push origin v1.4.
References[edit]
- ↑ Git Basics - Tagging, Git documentation