public function checkout($ref, bool $create = false)
    {
        if ($create && is_null($this->getBranch($ref))) {
            $this->createBranch($ref);
        }
        $this->caller->execute(MainCommand::getInstance($this)->checkout($ref));

        return $this;
    }