Skip to main content

Git hooks facilitates some scripts or commands that you can run before or after any git commands. For example, you can set to lint, validate your code using phpcs before every commit or push.

composer require acquia/blt
composer require acquia/blt-phpcs

You have successfully installed everything you need.

vendor/bin/blt blt:init:git-hooks

Once this is run, you will have the necessary files you need for git pre-commit and pre-push hooks.

FYI,

vendor/bin/blt validate # This command will validate all php, twig, composer and yaml files.
vendor/bin/blt validate php # To validate only php
x

Work

Therefore logo
80 Atlantic Ave, Toronto, ON Canada
Email: hello@therefore.ca
Call us: +1 4166405376
Linkedin

Let us know how we can help!