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:
- Push feature branch to remote.
- Create a pull request via the UI or CLI.
- Add reviewers and optional auto-complete.
- Merge after successful policies.
FAQ
- Q: How many repositories can I have?
A: Unlimited per organization. - Q: Does Azure Repos support LFS?
A: Yes, enable Git Large File Storage per repo.