Skip to content Skip to navigation

Blog Archive

September 2016

Git: Find the First Tag Containing a Specified Keyword

Photo of John Bickar Posted by John Bickar on Wednesday, September 7, 2016 - 8:00am

Today's post is a quick tutorial how to use "git grep" and "git tag" to find the earliest tag that contains a particular line of code.

TL;DR: use:

git grep <regexp> $(git rev-list --all)...