don’t get lost in the sea of tags
¶ by Rob FrieselEver feeling lost in a sea of not-exactly-ordered tags when you enter git tag
at the command prompt? It seems that a common tagging idiom in a lot of git repos is to tag important milestones or releases. Some repos use <major>.<minor>
, others <major>.<minor>.<version>
, still others <major>.<minor>.<version>.<patch>
(and so on?). And as those repos get along, so do their version numbers. And before long, they don’t all fit on the screen; and if the updates are frequent enough, you might find that you missed that latest tag because 1.0.1.21
was “off the screen” and what you thought was the latest (1.0.1.9
) was already long out-of-date. But a little Ruby magic can make this all better:
And then (after optionally adjusting the Ruby script as meets your needs) add the following alias to your .gitconfig
:
…and you should be good to go. No more mysteries. (It even gracefully handles tag suffixes like -beta
.)
Leave a Reply