public static function create(Repository $repository, string $name, string $startPoint = null)
    {
        $repository
            ->getCaller()
            ->execute(BranchCommand::getInstance($repository)->create($name, $startPoint));

        return new self($repository, $name);
    }
public static function create(Repository $repository, string $name, string $startPoint = null)
    {
        $repository
            ->getCaller()
            ->execute(BranchCommand::getInstance($repository)->create($name, $startPoint));

        return new self($repository, $name);
    }
public static function create ( Repository $ repository , string $ name , string $ startPoint = null ) { $ repository -> getCaller ( ) -> execute ( BranchCommand :: getInstance ( $ repository ) -> create ( $ name , $ startPoint ) ) ; return new self ( $ repository , $ name ) ; }
Creates a new branch on the repository and returns it

@param \GitElephant\Repository $repository repository instance
@param string                  $name       branch name
@param string                  $startPoint branch to start from

@throws \RuntimeException
@throws \Symfony\Component\Process\Exception\LogicException
@throws \Symfony\Component\Process\Exception\InvalidArgumentException
@throws \Symfony\Component\Process\Exception\RuntimeException
@return \GitElephant\Objects\Branch
Creates a new branch on the repository and returns it