3 ms·
Git hooks are great for formatters, but it's a big problem for large teams that you can't auto-install them on everyones machine. Of course I realize why git re
by georgewfraser 8y ago
Git hooks are great for formatters, but it's a big problem for large teams that you can't auto-install them on everyones machine. Of course I realize why git refuses to do this. At my company (Fivetran) we ended up writing a Java annotation processor that simply checks if you've installed the git hooks, and if you haven't it throws a big error message that says "YOU NEED TO RUN install_git_hooks.sh"
- newur 8y agoThat sounds very interesting. Do you have some example code that you can share?
- Dunedan 8y agoThe solution I prefer is to run all hooks as part of CI as well. So whenever somebody doesn't have them installed locally his builds will just fail if he did something the hooks would've caught. The next he time he'll think twice if he should wait for the failed CI build or just install the hooks locally.