Git · Senior · Question 27 of 76
What can a server-side pre-receive hook do that client hooks can't?
- 1Edit the commits before they are stored on the server
- 2Run faster because it executes on the developer's laptop
- ✓Correct answer: Reject pushes for everyone, since clients can't skip it
Explanation
Client hooks are optional and bypassable with --no-verify. Server hooks (or platform rules) enforce policies like no force-push or no large files for every push.