Last active
June 2, 2016 11:45
-
-
Save phamngsinh/ae49f402c9471a1c98ef7ed167b8e9f3 to your computer and use it in GitHub Desktop.
Search all of Git history for a string?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git rev-list --all | ( | |
| while read revision; do | |
| git grep -F 'password' $revision | |
| done | |
| ) | |
| ==== | |
| git rev-list --all | GIT_PAGER=cat xargs git grep 'search_string' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment