Git is everyday. It has become an essential in the programmer’s toolbox and supports all the good buzzwords – maintainability, agility, predictability, you name it. The hooking functionality it provides has spawned an industry of its own, with companies like Codeship, Hakiri, Travis CI and such being fundamentally structured atop it.
These hooks are straight forward to work with, so just as the creators of those companies would’ve, we can jump in and have a go ourselves. I use it so I can easily push changes to web servers, etcetera, instead of having to manually (and error prone-ly) sync files, and that’s what I’ll be demonstrating here – one push to deploy.
It’ll be a simplified version of Digital Ocean’s great Git hooks post, and an improvement to a similar post I wrote almost a year ago (which has a critical security flaw (see my comment on that post)).
So lets get started…