diff --git a/writeups/gitsecrets.md b/writeups/gitsecrets.md index 437a3ce..bbdc302 100644 --- a/writeups/gitsecrets.md +++ b/writeups/gitsecrets.md @@ -31,9 +31,9 @@ Show the contents of a file from a particular commit git show [commit_id]:[filename] -Search for file contents across all commits +Search for file contents across all commits (add `--no-pager` after git to not pipe through less or similar) - git grep -n 'search pattern' $(git rev-list --all) + git grep --all -n 'search pattern' $(git rev-list --all) If the above is performed on a repository with too many commits to list in one command you can get a subset of the first 10000 lines like so