Azure Repos

Overview

Azure Repos provides unlimited, cloud-hosted private Git repositories. It integrates seamlessly with Azure Pipelines, Boards, and other services, enabling end‑to‑end DevOps workflows.

Getting Started

Follow these steps to create your first repository:

# Create a new project
az devops project create --name MyProject

# Create a Git repo
az repos create --name MyRepo --project MyProject

# Clone the repo
git clone https://dev.azure.com/YourOrg/MyProject/_git/MyRepo

Branch Policies

Enforce code quality by configuring branch policies such as required reviewers, build validation, and work item linking.

// Example policy JSON
{
  "type": "build",
  "settings": {
    "buildDefinitionId": 12,
    "displayName": "CI Build",
    "queueOnSourceUpdateOnly": true
  }
}

Code Review Workflow

Use pull requests to collaborate on code changes. The default workflow includes:

  1. Push feature branch to remote.
  2. Create a pull request via the UI or CLI.
  3. Add reviewers and optional auto-complete.
  4. Merge after successful policies.

FAQ