Hooks automate repository events
Git hooks are scripts that run at points such as committing, receiving pushed objects or checking out a branch. They can enforce local checks or automate repetitive tasks.
Client-side versus server-side hooks
Client-side hooks can improve developer workflow but are not a security boundary because developers control their local environment. Server-side hooks can enforce rules for a central repository.
Keep hooks fast and maintainable
A hook that takes too long can frustrate developers. Put substantial logic in normal scripts or CI and have the hook call those scripts when appropriate.