File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ A collection of cool hidden and not so hidden features of Git and GitHub. This c
57
57
- [ Styled Git Status] ( #styled-git-status )
58
58
- [ Styled Git Log] ( #styled-git-log )
59
59
- [ Git Query] ( #git-query )
60
+ - [ Git Grep] ( #git-grep )
60
61
- [ Merged Branches] ( #merged-branches )
61
62
- [ Fixup and Autosquash] ( #fixup-and-autosquash )
62
63
- [ Web Server for Browsing Local Repositories] ( #web-server-for-browsing-local-repositories )
@@ -764,6 +765,32 @@ $ git show :/typo
764
765
765
766
* Press ` q ` to quit.*
766
767
768
+
769
+ ### Git Grep
770
+ Grep pattern under your git versioned folder.
771
+
772
+ Running:
773
+ ```
774
+ git grep aliases
775
+ ```
776
+ will show all the files containing the string * aliases* .
777
+
778
+ ![ git grep aliases] ( http://i.imgur.com/q3WkUgl.png?1 )
779
+
780
+ * Press ` q ` to quit.*
781
+
782
+ We can also use multiple flags for more advanced search. For example:
783
+
784
+ * ` -e ` The next parameter is the pattern (including regex)
785
+ * ` --and ` Combine multiple patterns.
786
+
787
+ Use it like this:
788
+ ```
789
+ git grep -e pattern --and -e anotherpattern
790
+ ```
791
+
792
+ [ * Read more about the Git ` grep ` command.* ] ( http://git-scm.com/docs/git-grep )
793
+
767
794
### Merged Branches
768
795
Running:
769
796
You can’t perform that action at this time.
0 commit comments