mirror of
https://github.com/namibia/tips.git
synced 2024-06-12 07:02:37 +00:00
Merge pull request #91 from scriptype/master
Add git grep --heading --line-number <pattern>
This commit is contained in:
commit
cffab88ab8
|
@ -117,6 +117,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
|
||||||
* [Turn off git colored terminal output](#turn-off-git-colored-terminal-output)
|
* [Turn off git colored terminal output](#turn-off-git-colored-terminal-output)
|
||||||
* [specific color settings](#specific-color-settings)
|
* [specific color settings](#specific-color-settings)
|
||||||
* [Show all local branches ordered by recent commits](#show-all-local-branches-ordered-by-recent-commits)
|
* [Show all local branches ordered by recent commits](#show-all-local-branches-ordered-by-recent-commits)
|
||||||
|
* [Find lines matching the pattern (regex or string) in tracked files](#find-lines-matching-the-pattern-regex-or-string-in-tracked-files)
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end toc -->
|
<!-- @doxie.inject end toc -->
|
||||||
|
@ -805,5 +806,10 @@ git config --global <specific command e.g branch, diff> <true, false or always>
|
||||||
git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/
|
git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Find lines matching the pattern (regex or string) in tracked files
|
||||||
|
```sh
|
||||||
|
git grep --heading --line-number 'foo bar'
|
||||||
|
```
|
||||||
|
|
||||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||||
<!-- @doxie.inject end -->
|
<!-- @doxie.inject end -->
|
||||||
|
|
|
@ -354,4 +354,7 @@
|
||||||
},{
|
},{
|
||||||
"title": "Show all local branches ordered by recent commits",
|
"title": "Show all local branches ordered by recent commits",
|
||||||
"tip": "git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/"
|
"tip": "git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/"
|
||||||
|
},{
|
||||||
|
"title": "Find lines matching the pattern (regex or string) in tracked files",
|
||||||
|
"tip": "git grep --heading --line-number 'foo bar'"
|
||||||
}]
|
}]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user