private static async Task GitInit(IGitDriver git, RepositoryData repository)
        {
            await git.Clone(repository.Pull.Uri, repository.DefaultBranch);

            repository.DefaultBranch = repository.DefaultBranch ?? await git.GetCurrentHead();

            await git.AddRemote(repository.Remote, repository.Push.Uri);
        }
Example #2
0
 private static void GitInit(IGitDriver git, RepositoryData repository)
 {
     git.Clone(repository.Pull.Uri);
     repository.DefaultBranch = git.GetCurrentHead();
     git.AddRemote(repository.Remote, repository.Push.Uri);
 }