Proposal: new hook to detect LFS attribute inconsistencies

Author: klimkinCreated Mar 1, 2024Updated Aug 2, 2026

There are two common errors when working with LFS:

  • Keeping files as general objects after setting LFS attributes (LFS produces a warnings like "Encountered 1 file(s) that should have been pointers, but weren't")
  • Keeping LFS pointers after removing the attributes.

Proposed implementation of a check-lfs-attributes hook: https://github.com/klimkin/pre-commit-hooks/tree/feature/check-lfs-attributes

Source: pre-commit/pre-commit-hooks