File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -789,26 +789,27 @@ $ git show :/typo
789789
790790
791791### Git Grep
792- Grep pattern under your git versioned folder.
792+
793+ Git Grep will return a list of lines matching a pattern.
793794
794795Running:
795- ```
796- git grep aliases
796+ ``` bash
797+ $ git grep aliases
797798```
798799will show all the files containing the string * aliases* .
799800
800- ![ git grep aliases] ( http://i.imgur.com/q3WkUgl .png?1 )
801+ ![ git grep aliases] ( http://i.imgur.com/DL2zpQ9 .png )
801802
802803* Press ` q ` to quit.*
803804
804- We can also use multiple flags for more advanced search. For example:
805+ You can also use multiple flags for more advanced search. For example:
805806
806- * ` -e ` The next parameter is the pattern (including regex)
807- * ` --and ` Combine multiple patterns.
807+ * ` -e ` The next parameter is the pattern (e.g. regex)
808+ * ` --and ` , ` --or ` and ` --not ` Combine multiple patterns.
808809
809810Use it like this:
810- ```
811- git grep -e pattern --and -e anotherpattern
811+ ``` bash
812+ $ git grep -e pattern --and -e anotherpattern
812813```
813814
814815[ * Read more about the Git ` grep ` command.* ] ( http://git-scm.com/docs/git-grep )
You can’t perform that action at this time.
0 commit comments