Advanced Git & Version Control
Q91 / 100

How do Git "hooks" differ between client-side and server-side, and what is a common server-side use case for "pre-receive" hooks?

Correct! Well done.

Incorrect.

The correct answer is A) Client-side hooks (pre-commit, post-checkout) run locally and aren't transferred on clone, while server-side hooks (pre-receive, update) run remotely on push — "pre-receive" can enforce policies like rejecting force-pushes

A

Correct Answer

Client-side hooks (pre-commit, post-checkout) run locally and aren't transferred on clone, while server-side hooks (pre-receive, update) run remotely on push — "pre-receive" can enforce policies like rejecting force-pushes

Explanation

Because client-side hooks live in the local ".git/hooks" directory and aren't version-controlled or transferred via clone/push, server-side hooks are essential for enforcing policies that cannot be bypassed by individual developers' local configurations.

Progress
91/100