public void GenerateSpecificVersion(RepositoryUrl repositoryUrl, string commit) { var pathResolver = new PathResolver(repositoryUrl.Url, commit); var repositoryFolder = pathResolver.GetRepositoryPath(); var repository = new Repository(repositoryFolder + "/.git"); repository.Checkout(commit); var commitFolder = pathResolver.GetVersionPath(); Directory.CreateDirectory(commitFolder); DirectoryCopy(repositoryFolder, commitFolder, true); repository.Checkout(repository.Branches["master"]); }