Skip to content

Instantly share code, notes, and snippets.

@jmeridth
Last active July 5, 2016 14:07
Show Gist options
  • Select an option

  • Save jmeridth/ac1779ceb11cbf3218bca3b1ff2a48b8 to your computer and use it in GitHub Desktop.

Select an option

Save jmeridth/ac1779ceb11cbf3218bca3b1ff2a48b8 to your computer and use it in GitHub Desktop.
Showing difference between `git log -S [string]`, `git log -G [string]` and `git log --grep=[string]`
[jmlaptop][~/dev/test]
[master]->$ git log
commit 118258761878c6c36fb3f16f659564b18525a409
Author: jmeridth <[email protected]>
Date: Tue Jul 5 09:03:54 2016 -0500
This is a test of a multiline commit
- to search git log for keywords
commit 67146e8dc342a52dfa642835e47eac5dfd70f403
Author: jmeridth <[email protected]>
Date: Tue Jul 5 09:03:39 2016 -0500
initial commit
[jmlaptop][~/dev/test]
[master]->$ git log -S search
[jmlaptop][~/dev/test]
[master]->$ git log -G search
[jmlaptop][~/dev/test]
[master]->$ git log --grep=search
commit 118258761878c6c36fb3f16f659564b18525a409
Author: jmeridth <[email protected]>
Date: Tue Jul 5 09:03:54 2016 -0500
This is a test of a multiline commit
- to search git log for keywords
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment