git.rst
changeset 1932 6b987b040e18
parent 1912 8b81a8f0f692
child 2081 0d9703b4a428
equal deleted inserted replaced
1931:b51f9bba0709 1932:6b987b040e18
   214 Show heads in branch.
   214 Show heads in branch.
   215 =====================
   215 =====================
   216 ::
   216 ::
   217 
   217 
   218   $ git show-ref --heads -s
   218   $ git show-ref --heads -s
       
   219 
       
   220 Search string in file
       
   221 =====================
       
   222 
       
   223 To search string in all or specific files or working copy::
       
   224 
       
   225   $ git grep $PATT
       
   226   $ git grep -i $PATT -- '*.[ch]'
       
   227 
       
   228 To search in all history::
       
   229 
       
   230   $ git log -S$PATT
       
   231   $ git log -G$PATT
       
   232   $ git grep -i PATT $(git rev-list --all) -- '*.[ch]'
   219 
   233 
   220 Find most recent tag for revision.
   234 Find most recent tag for revision.
   221 ==================================
   235 ==================================
   222 ::
   236 ::
   223 
   237