GitHttpClientBase.CreateRepositoryAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| CreateRepositoryAsync(GitRepositoryCreateOptions, String, Object, CancellationToken) |
[Preview API] Create a git repository in a team project. |
| CreateRepositoryAsync(GitRepositoryCreateOptions, Guid, String, Object, CancellationToken) |
[Preview API] Create a git repository in a team project. |
| CreateRepositoryAsync(GitRepositoryCreateOptions, String, String, Object, CancellationToken) |
[Preview API] Create a git repository in a team project. |
CreateRepositoryAsync(GitRepositoryCreateOptions, String, Object, CancellationToken)
[Preview API] Create a git repository in a team project.
public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitRepository> CreateRepositoryAsync(Microsoft.TeamFoundation.SourceControl.WebApi.GitRepositoryCreateOptions gitRepositoryToCreate, string sourceRef = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.CreateRepositoryAsync : Microsoft.TeamFoundation.SourceControl.WebApi.GitRepositoryCreateOptions * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitRepository>
Parameters
- gitRepositoryToCreate
- GitRepositoryCreateOptions
Specify the repo name, team project and/or parent repository. Team project information can be ommitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id).
- sourceRef
- String
[optional] Specify the source refs to use while creating a fork repo
- userState
- Object
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.
Returns
Applies to
CreateRepositoryAsync(GitRepositoryCreateOptions, Guid, String, Object, CancellationToken)
[Preview API] Create a git repository in a team project.
public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitRepository> CreateRepositoryAsync(Microsoft.TeamFoundation.SourceControl.WebApi.GitRepositoryCreateOptions gitRepositoryToCreate, Guid project, string sourceRef = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.CreateRepositoryAsync : Microsoft.TeamFoundation.SourceControl.WebApi.GitRepositoryCreateOptions * Guid * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitRepository>
Parameters
- gitRepositoryToCreate
- GitRepositoryCreateOptions
Specify the repo name, team project and/or parent repository. Team project information can be ommitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id).
- project
- Guid
Project ID
- sourceRef
- String
[optional] Specify the source refs to use while creating a fork repo
- userState
- Object
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.
Returns
Applies to
CreateRepositoryAsync(GitRepositoryCreateOptions, String, String, Object, CancellationToken)
[Preview API] Create a git repository in a team project.
public virtual System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitRepository> CreateRepositoryAsync(Microsoft.TeamFoundation.SourceControl.WebApi.GitRepositoryCreateOptions gitRepositoryToCreate, string project, string sourceRef = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
override this.CreateRepositoryAsync : Microsoft.TeamFoundation.SourceControl.WebApi.GitRepositoryCreateOptions * string * string * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.TeamFoundation.SourceControl.WebApi.GitRepository>
Parameters
- gitRepositoryToCreate
- GitRepositoryCreateOptions
Specify the repo name, team project and/or parent repository. Team project information can be ommitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id).
- project
- String
Project ID or project name
- sourceRef
- String
[optional] Specify the source refs to use while creating a fork repo
- userState
- Object
- cancellationToken
- CancellationToken
The cancellation token to cancel operation.