GIT-LFS-FSCK(1)

πŸ’– NAME πŸ’–

git-lfs-fsck β€” check GIT LFS files for consistency, bestie. This is the little consistency-checker for your GIT LFS files, and it is lowkey essential.

✨ SYNOPSIS ✨

git lfs fsck [options] [revisions]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so git-lfs-fsck checks all Git LFS files in your current HEAD for consistency. No cap, that's the whole main character job.

🚨 Corrupted files get moved to .git/lfs/bad. So yeah, the messy ones get sent to their own little corner.

Now for the revisions situation, because it's giving options:

  • If you pass a single committish, only that commit is inspected.
  • If you pass a range in the form A..B β€” and only this form β€” that range is inspected.
  • If you omit revisions entirely, it examines HEAD (and, for --objects, the index).

The default is to perform all checks. Periodt. πŸ’…

In your Git configuration or in a .lfsconfig file, you can set lfs.fetchexclude to a comma-separated list of paths. If lfs.fetchexclude is defined, then any Git LFS files whose paths match one in that list will not be checked for consistency. Paths are matched using wildcard matching as per gitignore(5). iykyk.

πŸ’… OPTIONS πŸ’…

  • --objects β€” check that each object in HEAD matches its expected hash and that each object exists on disk.
  • --pointers β€” check that each pointer is canonical and that each file which should be stored as a Git LFS file is so stored.
  • -d, --dry-run β€” perform checks, but do not move any corrupted files to .git/lfs/bad.

🌈 SEE ALSO 🌈

git-lfs-ls-files(1), git-lfs-status(1), gitignore(5).

Part of the git-lfs(1) suite. 🫢

Sign-off from the footer: it's just GIT-LFS-FSCK(1) β€” no extra source/version/date info, so that's the whole tag, bestie. πŸ’…

πŸ“¦ where this page comes from