Using git hooks locally
Git comes with the concept of "hooks" which are scripts that get executed when and event occurs. A common use case for git hooks is to run a test suite before a commit (pre-commit) is made. If the script that is executed exits with a non-zero value (error) then the commit is prevented.