I\'ve looked at the githooks manpage but unless I\'m missing something I don\'t see an option for local, post-push git hooks. I\'d like to have one that updates the api doc
This type of hook is not supported by Git. It falls outside the valid reasons for a Git hook as given by Git's maintainer.
The introductory remark in the above linked message speaks almost directly to your case:
I do not particularly like hooks that act after an operation is initiated locally and act solely on local data. This is maybe because I still consider git tools building blocks suitable for higher level scripting more than other people do.
An extra pushurl
to a local repo with an “alternates” objects store could give you a low overhead way to locally execute a push hook. But really, the effort is much more than git push upstream && update-web-server
(maybe in a shell alias, git alias, or script).