logoalt Hacker News

eruyesterday at 9:18 AM2 repliesview on HN

> This includes Git. Don't try to force any particular workflow, including mandatory or automatically-enabled hooks.

And with git, you can even make anything that happens on the dev machines mandatory.

Anything you want to be mandatory needs to go into your CI. Pre-commit and pre-push hooks are just there to lower CI churn, not to guarantee anything.

(With the exception of people accidentally pushing secrets. The CI is too late for that, and a pre-push hook is a good idea.)


Replies

darkwateryesterday at 10:37 AM

A good analogy is: git hooks are client-side validation; CI is server-side validation, aka the only validation you can trust.

normie3000yesterday at 9:24 AM

> with git, you can even make anything that happens on the dev machines mandatory

s/can/can't?

show 2 replies