Version Control with Git in Azure Repos

Completed

Estimated time: 60 minutes.

Scenario

Azure DevOps supports two types of version control, Git and Team Foundation Version Control (TFVC). Here's a quick overview of the two version control systems:

  • Team Foundation Version Control (TFVC): TFVC is a centralized version control system. Typically, team members have only one version of each file on their dev machines. Historical data is maintained only on the server. Branches are path-based and created on the server.
  • Git: Git is a distributed version control system. Git repositories can live locally (on a developer's machine). Each developer has a copy of the source repository on their dev machine. Developers can commit each set of changes on their dev machine, perform version control operations such as history, and compare without a network connection.

Git is the default version control provider for new projects. You should use Git for version control in your projects unless you need centralized version control features in TFVC.

In this lab, you'll learn to establish a local Git repository, which can easily be synchronized with a centralized Git repository in Azure DevOps. In addition, you'll learn about Git branching and merging support. You'll use Visual Studio Code, but the same processes apply to using any Git-compatible client.

Objectives

After completing this lab, you'll be able to:

  • Clone an existing repository.
  • Save work with commits.
  • Review the history of changes.
  • Work with branches by using Visual Studio Code.

Requirements

Exercises

During this lab, you'll complete the following exercises:

  • Exercise 0: Configure the lab prerequisites.
  • Exercise 1: Clone an existing repository.
  • Exercise 2: Save work with commits.
  • Exercise 3: Review history.
  • Exercise 4: Work with branches.

Screenshot of a launch button, which will take you to the lab.