Use the interface: ArtARTs36\GitHandler\Contracts\Commands\GitConfigCommand
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
$command = (new LocalGitFactory())->factory(__DIR__)->config();
public function getAll(): ArtARTs36\GitHandler\Config\Subjects\SubjectsCollection;
git config --list
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->config()->getAll();
public function getSubject(string $prefix): ArtARTs36\GitHandler\Contracts\Config\ConfigSubject;
git config --list
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->config()->getSubject('user');
public function set(string $scope, string $field, string $value, bool $replaceAll = false): bool;
git config $scope.$field=$value
git config $scope.$field=$value --replace-all
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->config()->set('user', 'name', 'ArtARTs36');
public function unset(string $scope, string $field): void;
git config --unset $scope.$field
git config --unset $scope.$field
use \ArtARTs36\GitHandler\Factory\LocalGitFactory;
(new LocalGitFactory())->factory(__DIR__)->config()->unset('user', 'name');