Skip to content
Latchkey

Git Hook - CI/CD Glossary Definition

A Git hook is a script Git runs automatically at events like commit, push, or merge.

A Git hook is a script Git runs automatically at points in its workflow, such as before a commit, before a push, or after a merge. Hooks live in .git/hooks and automate local checks.

Client vs server hooks

Client-side hooks (pre-commit, pre-push) run on the developer machine and are not shared automatically; server-side hooks (pre-receive) run on the remote and can enforce policy centrally.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →