found drama

get oblique

don’t get lost in the sea of tags

by Rob Friesel

Ever 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 was “off the screen” and what you thought was the latest ( 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.)

About Rob Friesel

Software engineer by day, science fiction writer by night; weekend homebrewer. Author of The PhantomJS Cookbook and a short story in Please Do Not Remove. View all posts by Rob Friesel →

Leave a Reply

Your email address will not be published.