In 2025 I just renamed C:\project\.git\hooks\pre-commit.sample to pre-commit
#!/bin/sh echo "🚀 Run tests..." php artisan test if [ $? -ne 0 ]; then echo "❌ Test failed!" exit 1 fi echo "✅ Passed, pushing..." exit 0