Last active
December 9, 2015 19:38
-
-
Save leoapost/4318392 to your computer and use it in GitHub Desktop.
Search for a keyword in every file that has been changed in the last 20 commits of a specific author
This file contains hidden or 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
# Replace AUTHOR_NAME with the author's name | |
# Replace KEYWORD with the keyword you wanna find | |
for x in $(git log --author=AUTHOR_NAME --pretty=format:'%h' -n 20 | cut -d" " -f1) ; do for y in $(git show --pretty="format:" --name-only $x) ; do if [ -f $y ]; then echo $y ; grep -in 'KEYWORD' $y ; fi ; done ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment