az repos

Manage Azure Repos.

Commands

az repos create Create a Git repository in a team project.
az repos delete Delete a Git repository in a team project.
az repos import Manage Git repositories import.
az repos import create Create a git import request (currently only supports import from public git source).
az repos list List Git repositories of a team project.
az repos policy Manage branch policy.
az repos policy approver-count Manage approver count policy.
az repos policy approver-count create Create approver count policy.
az repos policy approver-count update Update approver count policy.
az repos policy build Manage build policy.
az repos policy build create Create build policy.
az repos policy build update Update build policy.
az repos policy case-enforcement Manage case enforcement policy.
az repos policy case-enforcement create Create case enforcement policy.
az repos policy case-enforcement update Update case enforcement policy.
az repos policy comment-required Manage comment required policy.
az repos policy comment-required create Create comment resolution required policy.
az repos policy comment-required update Update comment resolution required policy.
az repos policy create Create a policy using a configuration file.
az repos policy delete Delete a policy.
az repos policy file-size Manage file size policy.
az repos policy file-size create Create file size policy.
az repos policy file-size update Update file size policy.
az repos policy list List all policies in a project.
az repos policy merge-strategy Manage merge strategy policy.
az repos policy merge-strategy create Create merge strategy policy.
az repos policy merge-strategy update Update merge strategy policy.
az repos policy required-reviewer Manage required reviewer policy.
az repos policy required-reviewer create Create required reviewer policy.
az repos policy required-reviewer update Update required reviewer policy.
az repos policy show Show policy details.
az repos policy update Update a policy using a configuration file.
az repos policy work-item-linking Manage work item linking policy.
az repos policy work-item-linking create Create work item linking policy.
az repos policy work-item-linking update Update work item linking policy.
az repos pr Manage pull requests.
az repos pr checkout Checkout the PR source branch locally, if no local changes are present.
az repos pr create Create a pull request.
az repos pr list List pull requests.
az repos pr policy Manage pull request policy.
az repos pr policy list List policies of a pull request.
az repos pr policy queue Queue an evaluation of a policy for a pull request.
az repos pr reviewer Manage pull request reviewers.
az repos pr reviewer add Add one or more reviewers to a pull request.
az repos pr reviewer list List reviewers of a pull request.
az repos pr reviewer remove Remove one or more reviewers from a pull request.
az repos pr set-vote Vote on a pull request.
az repos pr show Get the details of a pull request.
az repos pr update Update a pull request.
az repos pr work-item Manage work items associated with pull requests.
az repos pr work-item add Link one or more work items to a pull request.
az repos pr work-item list List linked work items for a pull request.
az repos pr work-item remove Unlink one or more work items from a pull request.
az repos ref Manage Git references.
az repos ref create Create a reference.
az repos ref delete Delete a reference.
az repos ref list List the references.
az repos ref lock Lock a reference.
az repos ref unlock Unlock a reference.
az repos show Get the details of a Git repository.
az repos update Update the Git repository.

az repos create

Create a Git repository in a team project.

az repos create --name
[--detect {false, true}]
[--open]
[--org]
[--project]
[--subscription]

Required Parameters

--name

Name for the new repository.

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--open

Open the repository page in your web browser.

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az repos delete

Delete a Git repository in a team project.

az repos delete --id
[--detect {false, true}]
[--org]
[--project]
[--subscription]
[--yes]

Required Parameters

--id

ID of the repository.

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az repos list

List Git repositories of a team project.

az repos list [--detect {false, true}]
[--org]
[--project]
[--subscription]

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az repos show

Get the details of a Git repository.

az repos show --repository
[--detect {false, true}]
[--open]
[--org]
[--project]
[--subscription]

Required Parameters

--repository -r

Name or ID of the repository.

Optional Parameters

--detect

Automatically detect organization.

accepted values: false, true
--open

Open the repository page in your web browser.

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az repos update

Update the Git repository.

az repos update --repository
[--default-branch]
[--detect {false, true}]
[--name]
[--org]
[--project]
[--subscription]

Required Parameters

--repository -r

Name or ID of the repository.

Optional Parameters

--default-branch

Default branch to be set for the repository. Example: 'refs/heads/live' or 'live'.

--detect

Automatically detect organization.

accepted values: false, true
--name

New name for the repository.

--org --organization

Azure DevOps organization URL. You can configure the default organization using az devops configure -d organization=ORG_URL. Required if not configured as default or picked up via git config. Example: https://dev.azure.com/MyOrganizationName/.

--project -p

Name or ID of the project. You can configure the default project using az devops configure -d project=NAME_OR_ID. Required if not configured as default or picked up via git config.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.