Git · Option
pre-push hook
The pre-push hook runs during git push before Git transfers objects. It can inspect proposed reference updates and stop the push by returning a non-zero status.
Last updated
Syntax
$GIT_DIR/hooks/pre-push <remote-name> <remote-location>In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
git pushpre-receiveupdatepre-commitpost-mergepre-auto-gc