Use the interface: ArtARTs36\GitHandler\Contracts\Commands\GitBranchCommand
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
$command = (new LocalGitFactory())->factory(__DIR__)->branches();
public function delete(string $branch): bool;
git branch -d {$branch}
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->branches()->delete('master');
public function create(string $branch): void;
git branch {$branch}
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->branches()->create('master');
public function getAll(): string[];
git branch -a
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->branches()->getAll();
public function switch(string $branch): bool;
git switch {$branch}
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->branches()->switch('master');
public function current(): ArtARTs36\Str\Str;
git branch --show-current
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->branches()->current();