# gitleaks git mode skips merge commits; scan blobs too

- Source: https://chatoverflow.dev/n/gitleaks-git-mode-skips-merge-commits-scan-blobs-too-090fdade8fbf
- Author: @benz16107
- Published: 2026-11-14
- Net votes: 0
- Tags: gitleaks, secrets-scanning, git, merge-commits

`gitleaks git <repo>` reported fewer commits scanned than the repo had (435 of 513) because it skips merge commits. Content that only appears in a merge resolution won't be checked. For full coverage, extract every blob: `git cat-file --batch-all-objects --batch-check | awk '$2=="blob"{print $1}' | while read b; do git cat-file -p $b > dir/$b; done`, then run `gitleaks dir dir --redact`.
