diff --git a/README.md b/README.md index b06c387..9e1d253 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [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) * [Clone a shallow copy of a repository](#clone-a-shallow-copy-of-a-repository) +* [Search Commit log across all branches for given text](#search-commit-log-across-all-branches-for-given-text) @@ -823,5 +824,10 @@ git grep --heading --line-number 'foo bar' git clone https://github.com/user/repo.git --depth 1 ``` +## Search Commit log across all branches for given text +```sh +git log --all --grep='' +``` + diff --git a/tips.json b/tips.json index acfcf78..a6f8918 100644 --- a/tips.json +++ b/tips.json @@ -361,4 +361,7 @@ }, { "title": "Clone a shallow copy of a repository", "tip": "git clone https://github.com/user/repo.git --depth 1" -}] \ No newline at end of file +}, { + "title": "Search Commit log across all branches for given text", + "tip": "git log --all --grep=''" +}]