Skip to content

Instantly share code, notes, and snippets.

@pateketrueke
Created April 4, 2013 17:25
Show Gist options
  • Save pateketrueke/5312307 to your computer and use it in GitHub Desktop.
Save pateketrueke/5312307 to your computer and use it in GitHub Desktop.
Search text inside source-code with Git
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