LinuxCommandLibrary

az-repos

Manage Azure DevOps Git repositories and pull requests

TLDR

List all repositories in a project

$ az repos list --project [MyProject]
copy
Show details of a repository
$ az repos show --repository [MyRepo] --project [MyProject]
copy
Create a new repository
$ az repos create --name [MyRepo] --project [MyProject]
copy
Clone a repository URL
$ az repos show --repository [MyRepo] --project [MyProject] --query remoteUrl
copy
Delete a repository
$ az repos delete --id [repo-id] --project [MyProject]
copy
List pull requests
$ az repos pr list --project [MyProject]
copy
Create a pull request
$ az repos pr create --source-branch [feature] --target-branch [main] --title [My PR] --project [MyProject]
copy
Show pull request details
$ az repos pr show --id [pr-id]
copy

SYNOPSIS

az repos subcommand [options]

DESCRIPTION

az repos manages Azure Repos, the Git repository hosting service in Azure DevOps. It provides commands for managing repositories, pull requests, branches, and policies.
This is part of the Azure DevOps CLI extension and works with Azure DevOps Services.

SUBCOMMANDS

list

List repositories.
show
Show repository details.
create
Create a repository.
delete
Delete a repository.
update
Update a repository.
pr list
List pull requests.
pr create
Create a pull request.
pr show
Show pull request details.
pr update
Update a pull request.
pr complete
Complete a pull request.
policy
Manage branch policies.
ref
Manage Git references.
import
Import a repository.

CAVEATS

Requires the Azure DevOps CLI extension (az extension add --name azure-devops). Only works with Azure DevOps Services, not Azure DevOps Server. Configure defaults with az devops configure.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community