Created
December 17, 2012 13:45
-
-
Save leoapost/4318379 to your computer and use it in GitHub Desktop.
Search for a keyword in all commit affected files
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 KEYWORD with the keyword you wanna find | |
# Replace COMMIT_HASH with the actual hash (e.g. 2005b934aaad9b481f8966e618dabfc143ab8357) | |
for x in $(git show --pretty="format:" --name-only COMMIT_HASH) ; do if [ -f $x ]; then echo $x ; grep -in 'KEYWORD' $x ; fi ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment