2

In our working group we had a discussion on using git tags in our projects. Some people argumented pro tags and some argumented against using tags. The crux is that we are talking about Magento projects which aren't really using version numbers, hence the tags only consist of 20140624 date references.

The pro side was that it is easier to revert to a tag than a normal commit hash and it is part of gitflow, the contra side was that it only creates overhead.

What do you think on using git tags only for reverting history?

1
  • Why are you frequently reverting? (it sounds like you might mean resetting not reverting; in that case, why are you frequently resetting to previous commits?)
    – user253751
    Jun 26, 2014 at 10:56

1 Answer 1

2

My place uses tags for releases and hotfixes, where hotfixes are a letter subset of the current release. Ie

release/1.0.1
hotfix/1.0.1a
hotfix/1.0.1b

release/1.0.2

and so on. It helps keep merge points grouped together by a common value so you can be sure what was put in where. Certainly, it creates overhead because you're reverting multiple commits, but wouldn't that happen anyway?

3
  • Just out of interest, isn't the merge point of each release branch into the master the same? We aren't using versioning, so the date seems as confusing as the merge commit.
    – Schwierig
    Jun 26, 2014 at 10:35
  • 2
    No, because the master branch is not static; it has merge activity occurring at various intervals. So the merge point of each release branch into master is not the same. The benefit of versioning release and hotfixes is to be able to group a set of features or fixes with a specific tag, so you know that Z is a newer version than X and is much clearer than using dates
    – Jason
    Jun 26, 2014 at 10:46
  • Thanks for your opinion, that actually sounds reasonable. I will wait and see if there is someone with another opinion. If not I will accept your answer tomorrow ;)
    – Schwierig
    Jun 26, 2014 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.