Add a Local Pre-Commit Quality Gate
After the near miss with a secret, the team wants a shared hook that blocks secret-like values and whitespace errors before they are ever committed.
Project labintermediate~25 minPro
What you'll do
- ✓Explain when a pre-commit hook runs
- ✓Version hooks with core.hooksPath
- ✓Record the executable bit in Git
- ✓Explain why hooks never replace CI
Lab outline
- 01Hook
- 02Enable
- 03Prove
Before you start
- Ignoring secrets (git-05)
Every lab runs on a real machine of your own in the browser — no installs, nothing to clean up — and checks your work automatically as you go.