Client-Side Git Hooks
Understand and implement client-side hooks like `pre-commit` and `post-merge` to enforce standards locally.
Intro to Git Hooks
Welcome! In this lesson, you'll learn about Git hooks. These are scripts that Git automatically runs before or after events like committing, merging, or pushing.
Think of them as automated assistants for your Git workflow. They help enforce project standards and automate routine tasks.
Client-Side vs. Server-Side
Git hooks come in two flavors:
- Client-side hooks: Run on your local machine. They only affect your personal repository. Examples include `pre-commit` and `post-merge`.
- Server-side hooks: Run on the Git server. They affect all pushes to the repository. We'll cover these in a later lesson.
This lesson focuses on client-side hooks and how to use them locally.