abhai
23 April 2022
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