You've got a lot of Gal

Yet another blog about Ruby, Rails, Javascript, Apple, Malteses and Shih-Tzus by Gal Steinitz

This site is completely static. It was last generated with Octopress and Jekyll on Sep 02, 2013 and hosted on github pages.

When Did This Feature Go Live? (Starring Git)

It can be very useful to be able to answer this question accurately.

To do this, add code to your deploy script that tags every production deploy with git. Example:

  timestamp ='%Y-%m-%d/at/%H.%M')
  tag_name = "deploy/#{timestamp}"
  `git tag #{tag_name}; git push origin #{tag_name}`

Now, if the question ever comes up when a particular feature went live, you can determine this down to the minute. Find a commit that was part of this feature. For example, a new header design:

   git log --grep="header"

Now you can use the –contains switch to find the earliest tag that contained this particular commit:

   git tag --contains <SHA>

See my previous post on git for more useful git commands.