Introduction
Git hooks are scripts that run automatically at certain points in your work. Client-side hooks run on your computer before or after you make changes, while server-side hooks run on the central server to control what happens when you push changes.
When you want to check your code for errors before saving it locally.
When you want to prevent bad code from being pushed to the shared repository.
When you want to automatically format your code before committing.
When you want to send notifications after someone pushes code to the server.
When you want to enforce rules like commit message style on the server.