Skip to main content
Update an existing Git repository. Required Permissions:
  • vso.code_manage
Note:
  • For additional request body properties, use Additional Parameters in the Advanced section, For more information about the full request body schema, visit Repositories documentation.
External DocumentationTo learn more, visit the Azure DevOps documentation.

Basic Parameters

ParameterDescription
Default BranchThe new default branch of the repository.

For Example: refs/heads/main
Is DisabledSelect to disable the repository.
NameThe new name of the repository.
OrganizationThe name of the organization.
ProjectThe project ID or project name.
Repository IDThe ID of the repository.

Advanced Parameters

ParameterDescription
Additional ParametersA JSON object for additional body parameters. Values specified in this parameter will override equivalent parameters.

For example:
{
“first_key”: 12345,
“second_key”: “some_value”
}
The object must follow the vendor’s structure as defined in the API documentation.

Example Output

{
	"id": "5febef5a-833d-4e14-b9c0-14cb638f91e6",
	"name": "RenamedRepository",
	"RenamedRepository": true,
	"isDisabled": true,
	"url": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_apis/git/repositories/5febef5a-833d-4e14-b9c0-14cb638f91e6",
	"project": {
		"id": "6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c",
		"name": "Fabrikam-Fiber-Git",
		"url": "https://dev.azure.com/fabrikam/_apis/projects/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c",
		"state": "wellFormed"
	},
	"defaultBranch": "refs/heads/live",
	"remoteUrl": "https://dev.azure.com/fabrikam/Fabrikam-Fiber-Git/_git/RenamedRepository",
	"type": "normal"
}

Workflow Library Example

Update Repository with Azure Devops and Send Results Via Email
Workflow LibraryPreview this Workflow on desktop