/// <summary>
        /// Clone
        /// </summary>
        /// <param name="directory">Directory</param>
        /// <param name="ssh">SSH</param>
        /// <param name="branch">Branch</param>
        /// <param name="cloneSubModules">Clone Submodules</param>
        /// <returns></returns>
        public static GitRepo Clone(string directory, Uri ssh, string branch, bool cloneSubModules = true)
        {
            if (string.IsNullOrEmpty(branch))
            {
                branch = "master";
            }

            string command = GitCommandBuilder.Clone(ssh, branch, directory, cloneSubModules);

            GitController.Default.Execute(command);

            return(new GitRepo()
            {
                Location = directory,
                Ssh = ssh,
            });
        }
 /// <summary>
 /// Clone To
 /// </summary>
 public Task<GitResult> CloneToAsync(string path) {
   return GitController
     .Default
     .ExecuteAsync(GitCommandBuilder.Clone(Ssh, Name, path, true));
 }
 /// <summary>
 /// Clone To
 /// </summary>
 public GitResult CloneTo(string path) {
   return GitController
     .Default
     .Execute(GitCommandBuilder.Clone(Ssh, Name, path, true));
 }