Created
April 2, 2012 21:51
-
-
Save anonymous/2287490 to your computer and use it in GitHub Desktop.
Git grep + blame bash function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# runs git grep on a pattern, and then uses git blame to who did it | |
ggb() { | |
git grep -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment