public function add($gitUrl, $path = null)
    {
        $this->clearAll();
        $this->addCommandName(sprintf('%s %s', self::SUBMODULE_COMMAND, self::SUBMODULE_ADD_COMMAND));
        $this->addCommandArgument($gitUrl);
        if (null !== $path) {
            $this->addCommandSubject($path);
        }

        return $this->getCommand();
    }
public function add($gitUrl, $path = null)
    {
        $this->clearAll();
        $this->addCommandName(sprintf('%s %s', self::SUBMODULE_COMMAND, self::SUBMODULE_ADD_COMMAND));
        $this->addCommandArgument($gitUrl);
        if (null !== $path) {
            $this->addCommandSubject($path);
        }

        return $this->getCommand();
    }
public function add ( $ gitUrl , $ path = null ) { $ this -> clearAll ( ) ; $ this -> addCommandName ( sprintf ( '%s %s' , self :: SUBMODULE_COMMAND , self :: SUBMODULE_ADD_COMMAND ) ) ; $ this -> addCommandArgument ( $ gitUrl ) ; if ( null !== $ path ) { $ this -> addCommandSubject ( $ path ) ; } return $ this -> getCommand ( ) ; }
add a submodule

@param string $gitUrl git url of the submodule
@param string $path   path to register the submodule to

@throws \RuntimeException
@return string
add a submodule