Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
git_searching [2019/02/21 14:04] – [Ignoring merge commits with --no-merges] rpjdaygit_searching [2019/02/21 14:17] (current) – [Config options] rpjday
Line 20: Line 20:
 $ git log --author="Robert P. J. Day" --oneline $ git log --author="Robert P. J. Day" --oneline
 $ git log --author="Robert P. J. Day" --oneline | wc -l $ git log --author="Robert P. J. Day" --oneline | wc -l
 +104
 $ git log -i --author="robert p. j. day" $ git log -i --author="robert p. j. day"
 </code> </code>
Line 115: Line 116:
 ===== Searching with "git grep" ===== ===== Searching with "git grep" =====
  
-... coming soon ...+==== DESCRIPTION ==== 
 + 
 +<code> 
 +Look for specified patterns in the tracked files in the work 
 +tree, blobs registered in the index file, or blobs in given 
 +tree objectsPatterns are lists of one or more search 
 +expressions separated by newline charactersAn empty string as 
 +search expression matches all lines. 
 +</code> 
 + 
 +==== SYNOPSIS ==== 
 + 
 +Options: 
 + 
 +<code> 
 +[-a | --text] [-I] [--textconv] [-i | --ignore-case] [-w | --word-regexp] 
 +  [-v | --invert-match] [-h|-H] [--full-name] 
 +  [-E | --extended-regexp] [-G | --basic-regexp] 
 +  [-P | --perl-regexp] 
 +  [-F | --fixed-strings] [-n | --line-number] [--column] 
 +  [-l | --files-with-matches] [-L | --files-without-match] 
 +  [(-O | --open-files-in-pager) [<pager>]] 
 +  [-z | --null] 
 +  [ -o | --only-matching ] [-c | --count] [--all-match] [-q | --quiet] 
 +  [--max-depth <depth>] [--[no-]recursive] 
 +  [--color[=<when>] | --no-color] 
 +  [--break] [--heading] [-p | --show-function] 
 +  [-A <post-context>] [-B <pre-context>] [-C <context>
 +  [-W | --function-context] 
 +  [--threads <num>
 +  [-f <file>] [-e] <pattern> 
 +  [--and|--or|--not|(|)|-e <pattern>...
 +  [-recurse-submodules] [--parent-basename <basename>
 +  [ [--[no-]exclude-standard] [--cached | --no-index | --untracked] | tree>...] 
 +  [--] [<pathspec>...] 
 +</code> 
 + 
 +==== Config options ==== 
 + 
 +  * ''grep.lineNumber'' 
 +  * ''grep.patternType'' 
 +  * ''grep.extendedRegexp'' 
 +  * ''grep.threads'' 
 +  * ''grep.fullName'' 
 +  * ''grep.fallbackToNoIndex'' 
 + 
 +See ''man git-config''
 + 
 +==== Examples ==== 
 + 
 +<code> 
 +$ git grep -il torvalds  
 +book/01-introduction/sections/history.asc 
 +book/07-git-tools/sections/debugging.asc 
 +
 +</code>
  • git_searching.1550757851.txt.gz
  • Last modified: 2019/02/21 14:04
  • by rpjday