Search working tree for text matching regular expression regexp:
git grep regexp
Search working tree for lines of text matching regexp A or B:
git grep -e A --or -e B
Search working tree for lines of text matching regexp A an B:
git grep -e A --and -e B
Search all revisions between rev1 and rev2 for text matching regular expression regexp:
git grep regexp $(git rev-list rev1..rev2)