From d6c0de7c854ac30d594b0cd306f655654b720509 Mon Sep 17 00:00:00 2001 From: Zachary Rice Date: Mon, 16 May 2022 19:08:06 -0500 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e361761..8438ac42 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ When running `detect` on a git repository, gitleaks will parse the output of a ` [here](https://github.com/zricethezav/gitleaks/blob/7240e16769b92d2a1b137c17d6bf9d55a8562899/git/git.go#L17-L25)). [`git log -p` generates patches](https://git-scm.com/docs/git-log#_generating_patch_text_with_p) which gitleaks will use to detect secrets. You can configure what commits `git log` will range over by using the `--log-opts` flag. `--log-opts` accepts any option for `git log -p`. -For example, if you wanted to run gitleaks on a range of commits you could use the following command: `gitleaks --source . --log-opts="--all commitA..commitB"`. +For example, if you wanted to run gitleaks on a range of commits you could use the following command: `gitleaks detect --source . --log-opts="--all commitA..commitB"`. See the `git log` [documentation](https://git-scm.com/docs/git-log) for more information. You can scan files and directories by using the `--no-git` option.