Skip to content

Instantly share code, notes, and snippets.

@coderarity
Created March 4, 2013 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderarity/5085896 to your computer and use it in GitHub Desktop.
Save coderarity/5085896 to your computer and use it in GitHub Desktop.
this is a messy way to find a git file from the depths of git! change the grep to be some way to identify your file
git prune -n > tmp12312661.txt
sed -i 's/ blob//g' tmp12312661.txt
while read line
do
git cat-file -p $line | grep "require('simplesmtp')"
if [ "$?" == "0" ]; then echo $line; fi
done < tmp12312661.txt
rm tmp12312661.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment