Created
April 4, 2013 17:25
-
-
Save pateketrueke/5312307 to your computer and use it in GitHub Desktop.
Search text inside source-code with Git
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
gs(){ | |
if [ -z "$1" ]; then | |
echo "Missing search string" | |
else | |
git rev-list --all | ( | |
while read revision; do | |
git grep -F "$1" $revision | |
done | |
) | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment