Skip to content

Instantly share code, notes, and snippets.

@mcginleyr1
Created January 9, 2015 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcginleyr1/d4874b74770309960a2a to your computer and use it in GitHub Desktop.
Save mcginleyr1/d4874b74770309960a2a to your computer and use it in GitHub Desktop.
git rev-list --all | (
while read revision; do
git grep -I -F $1 $revision
done
)
@Ry4an
Copy link

Ry4an commented Jan 9, 2015

Or in Mercurial hg grep $1 which does the same thing. In Mercurial to search a specific revision you'd do hg grep --revision $revision $1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment