Skip to content

Instantly share code, notes, and snippets.

@leoapost
Created December 17, 2012 13:45
Show Gist options
  • Save leoapost/4318379 to your computer and use it in GitHub Desktop.
Save leoapost/4318379 to your computer and use it in GitHub Desktop.

Revisions

  1. leoapost revised this gist Dec 17, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Replace KEYWORD with the keyword you wanna search for
    # 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
  2. leoapost created this gist Dec 17, 2012.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # Replace KEYWORD with the keyword you wanna search for
    # 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