Interview Prep/Git & GitHub/Submodules, LFS and Hooks

After cloning, `model.bin` contains three lines starting with `version https://git-lfs.github.com/spec/v1` instead of the real file.

BeginnerTroubleshootingSubmodules, LFS and Hooks
Answer

Likely causes → You got the LFS pointer file. Git LFS is not installed, git lfs install was never run (no smudge filter configured), or the clone used GIT_LFS_SKIP_SMUDGE=1.

Diagnose →

git lfs version
git config --get filter.lfs.smudge
git lfs ls-files        # "-" after the oid means pointer only, "*" means downloaded

Fix →

git lfs install
git lfs pull

In CI, enable LFS in the checkout (actions/checkout with lfs: true).

Prevent → Add git lfs install to the onboarding script and a CI check that fails if pointer files reach the build.

All Git & GitHub questions Roadmap: Git & GitHub

More on Submodules, LFS and Hooks