Git hooks enable you to do things when something happens in a Git repo. My favorite use is “push to deploy”: when I push new commits to a server, it will compile the thing and deploy a new version into production.
- finding out what is deployed in production is trivial
- deploying a new release is trivial
- and therefore there is little incentive to do horrible things like ssh-ing into prod and hotfixing things there :-)
I use it everywhere, because I have made it trivial to set up by writing it down :-)
For setup + code, see github.com/anotherkamila/git-hooks, naturally.