I've met a lot of developers that swear by tagging gits. Personally, I have never seen the use in it.
I understand that you can put version information in a tag, but why not just put that information in the commit message?
I'm just confused about what value the tag adds that the commit message cannot.
A tag has a similar meaning in Git and GitHub. Tags help in identifying different commits that are important enough to be recognized or be noticed. For example, tagging a commit with release version 3.0 means that commit was the final commit before the launch of the 3.0 version of the software.
About tags in GitHub DesktopTags are associated with commits, so you can use a tag to mark an individual point in your repository's history, including a version number for a release. For more information about release tags, see "About releases."
Mention a GitHub user in a comment:Create your comment or issue, as described previously, and then in the comment text box, type @, followed by the user or team name, within the comment.
Tags allow you to reference a specific commit in the repository. Using for instance a version tag, you can easily get the commit in your project that corresponds to e.g. version 1.5. This is preferable to remembering the hash of a specific commit, or scrolling/greping through log information to find out which commit represents version 1.5.
This could be useful for many reasons, but consider just one: you have two clients running different versions of your software, client A at version 1.5
and client B using version 2.0
. Client A reports a bug, and you can't just upgrade their install and instead need to address the bug in the version 1.5
code. Tagging version 1.5
allows you to easily get back to the code that they're running and work on a bugfix.
In Git, a tag lets you assign a symbolic name (something that is easy to remember) to a specific commit. This allows you to refer to that commit by name, instead of by raw commit id.
I sometimes add a local tag when I'm repeatedly referring back to a specific version, such as a point just before a lot of work was done. I also use annotated tags to tag a specific release version number (annotated tags can easily be pushed and can contain additional description other than just a name).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With