Share via


az repos

Note

This reference is part of the azure-devops extension for the Azure CLI (version 2.30.0 or higher). The extension will automatically install the first time you run an az repos command. Learn more about extensions.

Manage Azure Repos.

This command group is a part of the azure-devops extension.

Commands

Name Description Type Status
az repos create

Create a Git repository in a team project.

Extension GA
az repos delete

Delete a Git repository in a team project.

Extension GA
az repos import

Manage Git repositories import.

Extension GA
az repos import create

Create a git import request.

Extension GA
az repos list

List Git repositories of a team project.

Extension GA
az repos policy

Manage branch policy.

Extension GA
az repos policy approver-count

Manage approver count policy.

Extension GA
az repos policy approver-count create

Create approver count policy.

Extension GA
az repos policy approver-count update

Update approver count policy.

Extension GA
az repos policy build

Manage build policy.

Extension GA
az repos policy build create

Create build policy.

Extension GA
az repos policy build update

Update build policy.

Extension GA
az repos policy case-enforcement

Manage case enforcement policy.

Extension GA
az repos policy case-enforcement create

Create case enforcement policy.

Extension GA
az repos policy case-enforcement update

Update case enforcement policy.

Extension GA
az repos policy comment-required

Manage comment required policy.

Extension GA
az repos policy comment-required create

Create comment resolution required policy.

Extension GA
az repos policy comment-required update

Update comment resolution required policy.

Extension GA
az repos policy create

Create a policy using a configuration file.

Extension GA
az repos policy delete

Delete a policy.

Extension GA
az repos policy file-size

Manage file size policy.

Extension GA
az repos policy file-size create

Create file size policy.

Extension GA
az repos policy file-size update

Update file size policy.

Extension GA
az repos policy list

List all policies in a project.

Extension GA
az repos policy merge-strategy

Manage merge strategy policy.

Extension GA
az repos policy merge-strategy create

Create merge strategy policy.

Extension GA
az repos policy merge-strategy update

Update merge strategy policy.

Extension GA
az repos policy required-reviewer

Manage required reviewer policy.

Extension GA
az repos policy required-reviewer create

Create required reviewer policy.

Extension GA
az repos policy required-reviewer update

Update required reviewer policy.

Extension GA
az repos policy show

Show policy details.

Extension GA
az repos policy update

Update a policy using a configuration file.

Extension GA
az repos policy work-item-linking

Manage work item linking policy.

Extension GA
az repos policy work-item-linking create

Create work item linking policy.

Extension GA
az repos policy work-item-linking update

Update work item linking policy.

Extension GA
az repos pr

Manage pull requests.

Extension GA
az repos pr checkout

Checkout the PR source branch locally, if no local changes are present.

Extension GA
az repos pr create

Create a pull request.

Extension GA
az repos pr list

List pull requests.

Extension GA
az repos pr policy

Manage pull request policy.

Extension GA
az repos pr policy list

List policies of a pull request.

Extension GA
az repos pr policy queue

Queue an evaluation of a policy for a pull request.

Extension GA
az repos pr reviewer

Manage pull request reviewers.

Extension GA
az repos pr reviewer add

Add one or more reviewers to a pull request.

Extension GA
az repos pr reviewer list

List reviewers of a pull request.

Extension GA
az repos pr reviewer remove

Remove one or more reviewers from a pull request.

Extension GA
az repos pr set-vote

Vote on a pull request.

Extension GA
az repos pr show

Get the details of a pull request.

Extension GA
az repos pr update

Update a pull request.

Extension GA
az repos pr work-item

Manage work items associated with pull requests.

Extension GA
az repos pr work-item add

Link one or more work items to a pull request.

Extension GA
az repos pr work-item list

List linked work items for a pull request.

Extension GA
az repos pr work-item remove

Unlink one or more work items from a pull request.

Extension GA
az repos ref

Manage Git references.

Extension GA
az repos ref create

Create a reference.

Extension GA
az repos ref delete

Delete a reference.

Extension GA
az repos ref list

List the references.

Extension GA
az repos ref lock

Lock a reference.

Extension GA
az repos ref unlock

Unlock a reference.

Extension GA
az repos show

Get the details of a Git repository.

Extension GA
az repos update

Update the Git repository.

Extension GA

az repos create

Create a Git repository in a team project.

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

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.

Default value: False
--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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az repos delete

Delete a Git repository in a team project.

az repos delete --id
                [--detect {false, true}]
                [--org]
                [--project]
                [--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.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az repos list

List Git repositories of a team project.

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

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az repos show

Get the details of a Git repository.

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

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.

Default value: False
--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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az repos update

Update the Git repository.

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

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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.