here iw how.
In root, run this:
touch .git/hooks/pre-commit
Then, make it executable:
chmod +x .git/hooks/pre-commit
#!/bin/sh
echo "Running Pint ... "
files=$(git diff --cached --name-only --diff-filter=ACM -- '*.php');
./vendor/bin/pint $files
git add $files
echo "Running Pest ..." ./vendor/bin/pest --parallel --processes=4
and that is all.