0PricingLogin
Git Advanced: Monorepo, Submodules & Workflows · Lesson

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.

All lessons in this course

  1. Client-Side Git Hooks
  2. Server-Side Git Hooks
  3. Git Configuration & Aliases
  4. Sharing Hooks with the Team using Husky
← Back to Git Advanced: Monorepo, Submodules & Workflows