src/GitWorkingCopy.php
public function run(string $command, array $argsAndOptions = [], bool $setDirectory = true): string
    {
        $command = new GitCommand($command, ...$argsAndOptions);
        if ($setDirectory) {
            $command->setDirectory($this->directory);
        }

        return $this->gitWrapper->run($command);
    }
public function run(string $command, array $argsAndOptions = [], bool $setDirectory = true): string
    {
        $command = new GitCommand($command, ...$argsAndOptions);
        if ($setDirectory) {
            $command->setDirectory($this->directory);
        }

        return $this->gitWrapper->run($command);
    }
Runs a Git command and returns the output.

@param mixed[] $argsAndOptions