Use the interface: ArtARTs36\GitHandler\Contracts\Commands\GitSubmoduleCommand
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
$command = (new LocalGitFactory())->factory(__DIR__)->submodules();
public function add(string $url): void;
git submodule add $url
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->submodules()->add('url-test');
public function getAll(): array<string,\Submodule>;
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->submodules()->getAll();
public function remove(string $name): void;
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->submodules()->remove('name-test');
public function exists(string $name): bool;
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->submodules()->exists('name-test');
public function sync(string $name): void;
git submodule sync $name
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->submodules()->sync('name-test');
public function syncDefinesFromConfig(): void;
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->submodules()->syncDefinesFromConfig();