Git cleaner composer install php main.php Usage Example $app = new GitCleaner(); $app->removeUnusedBranches(); $app->notify( function ($branch) { /** @var GitRef $branch */ echo $branch->getRefName() . PHP_EOL; } ); Run tests ./vendor/bin/phpunit tests