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

Checkout fails: `Smudge error: Error downloading assets/model.bin (a1b2c3...): ... Object does not exist on the server` then `fatal: assets/model.bin: smudge filter lfs failed`.

IntermediateTroubleshootingSubmodules, LFS and Hooks
Answer

Likely causes → A commit references an LFS object that was never uploaded. The author pushed with --no-verify (skipping the LFS pre-push hook), pushed from a machine without LFS, or the repo was migrated without copying LFS objects.

Diagnose →

git log -1 --format='%h %an' -- assets/model.bin
git lfs ls-files --long | grep model.bin

Fix → Ask the author to upload the missing objects from their clone: git lfs push --all origin. To get unblocked meanwhile: GIT_LFS_SKIP_SMUDGE=1 git checkout <branch>, then git lfs pull --exclude="assets/model.bin".

Prevent → Don't use --no-verify on LFS repos; after migrations run git lfs fetch --all old && git lfs push --all new.

All Git & GitHub questions Roadmap: Git & GitHub

More on Submodules, LFS and Hooks