public function getRemotes(bool $queryRemotes = true)
    {
        $remoteNames = $this->caller
            ->execute(RemoteCommand::getInstance($this)->show(null, $queryRemotes))
            ->getOutputLines(true);

        $remotes = [];
        foreach ($remoteNames as $remoteName) {
            $remotes[] = $this->getRemote($remoteName, $queryRemotes);
        }

        return $remotes;
    }