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
- Enable check-added-large-files with a size limit that fits the repository.
- Track binary assets above the limit with Git LFS or move them to object storage.
- 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
-
TheAlgorithms/Python ·
pre-commit-hookspre-commit hook check-executables-have-shebangs -
langchain-ai/langchain ·
pre-commit-hookspre-commit hook check-yaml -
langflow-ai/langflow ·
pre-commit-hookspre-commit hook check-case-conflict -
fastapi/fastapi ·
pre-commit-hookspre-commit hook check-added-large-files -
ggml-org/llama.cpp ·
pre-commit-hookspre-commit hook trailing-whitespace