Awesome Reviewers

Verification · Hygiene · File hygiene

Large file guard

Refuse files above a size limit so binaries go to LFS or object storage.

How to build it

  1. Enable check-added-large-files with a size limit that fits the repository.
  2. Track binary assets above the limit with Git LFS or move them to object storage.
  3. Allow-list a file only when it must live in the repository.

Signals in a repository

  • A check-added-large-files entry with a maxkb argument in .pre-commit-config.yaml.
  • A .gitattributes file with filter=lfs patterns for binary asset types.
  • No tracked blob in the repository is above the configured size limit.

In practice

33 repositories run a tool for this check in the scanned set.

  • pre-commit-hooks · 33 repos

Examples