...

/

A More Sophisticated Example

A More Sophisticated Example

To get a better understanding of hooks, examine a more sophisticated example.

The previous pre-commit scripts were fairly limited in their usefulness. But just to give a flavor of what’s possible, you’re going to give an example that is able to choose whether to allow or reject a commit based on its content.

Banning keywords

Imagine that you’ve ...