This directory contains git hooks for the mu project.
To install the hooks, run:
./scripts/install-hooks.shThis will copy the hook scripts to your .git/hooks/ directory.
Runs before every commit to:
- Execute all tests (
go test ./... -short) - Prevent commits if tests fail
This helps catch regressions before they're committed to the repository.
Skip the hook (not recommended):
git commit --no-verifyThe hook scripts are version controlled in this scripts/ directory. After updating a hook:
- Edit the script in
scripts/ - Re-run
./scripts/install-hooks.shto update your local.git/hooks/ - Commit the updated script so other developers get the changes
Git hooks in .git/hooks/ are not tracked by git. By keeping our hooks in scripts/ and providing an install script, we can:
- Version control our hooks
- Share them with all developers
- Make updates easy to deploy