diff -r b51f9bba0709 -r 6b987b040e18 git.rst --- a/git.rst Wed Mar 02 18:33:53 2016 +0200 +++ b/git.rst Thu Mar 03 17:50:59 2016 +0200 @@ -217,6 +217,20 @@ $ git show-ref --heads -s +Search string in file +===================== + +To search string in all or specific files or working copy:: + + $ git grep $PATT + $ git grep -i $PATT -- '*.[ch]' + +To search in all history:: + + $ git log -S$PATT + $ git log -G$PATT + $ git grep -i PATT $(git rev-list --all) -- '*.[ch]' + Find most recent tag for revision. ================================== ::