Skip to content

Commit

Permalink
Update gitsecrets.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenbradshaw authored Feb 16, 2024
1 parent f5902a8 commit de391fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions writeups/gitsecrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit de391fe

Please # to comment.