问题
Is it possible to write my own scripts on git server hooks.If yes how can i do that i wanted to check when someone pushes to the server on which branch they are pushing just to make sure they don't push to the wrong branch.
回答1:
No it is not. You can use GitHub webhook, for GitHub to send message (payload) to your server (where you can listen to said message and trigger your own script)
But nothing would be executed on a GitHub server itself, for security reason.
来源:https://stackoverflow.com/questions/26375086/is-it-possible-to-write-a-script-on-a-server-side-hook-on-github