3

I've adopted a tagging system of x.x.x.x, and this works fine. However, you also need to leave a comment with your git tag. I've been using descriptions such as "fixes bug Y" or "feature X", but is this the best sort of comment to be leaving? Particularly, what if a tag encompasses several fixes, it seems not to make sense to have a very long tag comment. Does this mean that I should be creating a tag for every bug fix or feature, or should the tag comments be reflective of something else? I have a few ideas that may be good, but I'd love some advice from seasoned git tagging veterans :)

For those who prefer specific examples:

1.0.0.0 - initial release
1.0.0.1 - bug fix for issue X
1.0.0.2 - (what if this is a bug fix for multiple issues, the comment would be too long, no?)

Another example, in this example, the comments are more or less the same as the tags, it seems redundant. Is there something else we could be describing?

https://github.com/osCommerce/oscommerce2/tags

  • 5
    You shouldn't be tagging every little thing. What you're showing here is what commit messages were made for. Tags should be used for milestones, releases and the like. – Martin Green May 29 '13 at 5:50
  • I'm not sure I follow - each of these bug fixes may contain multiple commits (not necessarily for bug fixes, but certainly for features). Bug fixes need to be pushed to production, and thus it seems necessary to tag them, no? – Eva May 29 '13 at 5:54
  • What is the perceived benefit of doing that? – Martin Green May 29 '13 at 6:07
  • It keeps all releases well documented; it's easy to compare changes between tags as opposed to having to dig through commits that do not always represent releases. It also makes it easy to "roll back" to the last release if necessary. An example of this can be found here: github.com/osCommerce/oscommerce2/tags but in this example, the comments are more or less the same as the tags. I'm looking for a better system to fully maximise the utility of the comments – Eva May 29 '13 at 6:14
  • It looks like you're trying to use the tags as a "release notes" document; Instead, you can keep a release notes doc in the repository, and update it with each (relevant) commit. Or, easier, just use git-log. – aviv May 29 '13 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.