Loading tutorials
Intermediate · Mid: 12 chapters · 37 min read. States assumed prerequisites
Start readingsh script. By the end you will have a working pre-commit hook that blocks bad commits.git add, git commit and git push.core.hooksPath shares hooks. Here you will see how hooks get skipped, on purpose or by accident, and why a server-side check has to back them up.sh and regular expressions. Here you add a hook that checks the commit message instead of the staged files.pre-commit script, know the difference between the index and the working tree, and have shared hooks with core.hooksPath. Here you will see when a hook manager is worth adding and how the three common ones differ.core.hooksPath. Here you will move slow checks out of pre-commit and into pre-push.core.hooksPath. Here you will learn why hooks fail to run, how to see what they do, and what changes between operating systems.