Use the interface: ArtARTs36\GitHandler\Contracts\Commands\GitSetupCommand
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
$command = (new LocalGitFactory())->factory(__DIR__)->setup();
public function init(): bool;
git init
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->setup()->init();
public function isInit(): bool;
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->setup()->isInit();
public function clone(string $url, ?string $branch = null, ?string $folder = null): bool;
git clone $url
git clone $url -b $branch
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->setup()->clone('url-test', 'master', 'folder-test');
public function delete(): bool;
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->setup()->delete();
public function reinstall(?string $branch = null): void;
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->setup()->reinstall('master');