Module 7: Azure Repos & Git

Version control with Git and Azure Repos.

Duration: 60 minutes

Learning Objectives

  • • Master Git fundamentals and workflow
  • • Integrate with Azure Repos
  • • Implement effective branching strategies
  • • Collaborate on code using pull requests

Key Topics

Git Fundamentals and Workflow

Understanding version control concepts and Git commands.

# Essential Git commands
git init
git add .
git commit -m "Initial commit"
git push origin main
git pull origin main
git branch feature-branch
git checkout feature-branch
git merge feature-branch

Azure Repos Integration

Connecting local repositories with Azure DevOps.

# Connect to Azure Repos
git remote add origin https://dev.azure.com/yourorg/yourproject/_git/yourrepo
git push -u origin main

# Clone from Azure Repos
git clone https://dev.azure.com/yourorg/yourproject/_git/yourrepo

Branching Strategies

Implementing effective branching models for team collaboration.

  • • Git Flow: Feature branches from develop
  • • GitHub Flow: Feature branches from main
  • • GitLab Flow: Environment-based branching
  • • Trunk-based development

Code Collaboration

Using pull requests for code review and collaboration.

  • • Create and manage pull requests
  • • Code review best practices
  • • Merge strategies and conflict resolution
  • • Branch protection rules

Hands-on Exercises

Exercise 1: Git Repository Setup

Create a new repository in Azure Repos and push the Student Management application code.

Exercise 2: Feature Branch Workflow

Create feature branches, make changes, and submit pull requests for code review.

Exercise 3: Team Collaboration

Practice code review process and merge conflicts resolution with team members.