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

Hooks committed in `.githooks/` work for you but not for teammates.

BeginnerTroubleshootingSubmodules, LFS and Hooks
Answer

Likely causes → Git never runs hooks from the working tree by default and never installs them on clone (for security). You set core.hooksPath locally; your teammates did not.

Diagnose → git config --show-origin core.hooksPath

Fix → Each developer runs once:

git config core.hooksPath .githooks

Automate it via npm prepare (Husky), make setup, or the pre-commit install step.

Prevent → Treat client hooks as convenience only; enforce the same checks in CI and branch protection.

All Git & GitHub questions Roadmap: Git & GitHub

More on Submodules, LFS and Hooks