diff options
-rw-r--r-- | _tils/2020-08-16-search-in-git.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/_tils/2020-08-16-search-in-git.md b/_tils/2020-08-16-search-in-git.md index b76cdf5..552370b 100644 --- a/_tils/2020-08-16-search-in-git.md +++ b/_tils/2020-08-16-search-in-git.md @@ -9,7 +9,7 @@ ref: search-in-git Here's a useful trio to know about to help you search things in git: 1. `git show <commit>` -2. `git log --grep='<regexp>` +2. `git log --grep='<regexp>'` 3. `git grep '<regexp>' [commit]` ## 1. `git show <commit>` @@ -25,7 +25,7 @@ git show v1.2 # shows commit tagged with v1.2 ``` -## 2. `git log --grep='<regexp>` +## 2. `git log --grep='<regexp>'` Search through the commit messages: @@ -33,7 +33,7 @@ Search through the commit messages: git log --grep='refactor' ``` -## 3. `git grep <regexp> [commit]` +## 3. `git grep '<regexp>' [commit]` Search content in git history: |