Skip to content

Instantly share code, notes, and snippets.

@cocodrino
Created April 6, 2021 14:03
Show Gist options
  • Save cocodrino/3c3513fa6b36022a22c9b732822b44c4 to your computer and use it in GitHub Desktop.
Save cocodrino/3c3513fa6b36022a22c9b732822b44c4 to your computer and use it in GitHub Desktop.
search text across git branches
git grep "string/regexp" $(git rev-list --all)
or filtering every commit and only show branches
git grep "your-search" `git show-ref --heads` or git show-ref --heads | xargs git grep "your-search"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment