atmos git hooks
Run your project's checks automatically when developers commit or push. Define Git hooks through steps, workflows, or custom commands so the team shares the same checks, tools, and configuration.
Atmos installs small .git/hooks/* scripts that delegate to atmos git hooks run.
Configure each hook under git.hooks in
atmos.yaml with either a command or a sequence of steps.
Inline script steps execute inside Atmos
and can use the same step library as other automation scripts.
Configure hooks once in atmos.yaml:
git:
hooks:
pre-commit:
command: atmos workflow pre-commit
commit-msg:
command: atmos workflow commit-msg -- "$1"
Then install the shims:
atmos git hooks install
Local Git hooks are triggered by Git itself (git commit, git push, ...) in the current repository. They are separate from Atmos lifecycle hooks (the git hook kind), which trigger on Atmos events like after.terraform.apply.
Subcommands
Install local .git/hooks shims that delegate to atmos git hooks run.
Run a local Git hook command configured under git.hooks.
Remove Atmos-generated local Git hook shims.
Related
- Git Configuration — the
git.hookssection - Workflows — what hook commands typically invoke
kind: gitlifecycle hooks — event-bound Git publishing