hands-on lab

Using Git for Version Control: Branching

Difficulty: Beginner
Duration: Up to 45 minutes
Students: 5,118
Rating: 4.7/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Git is a version control system for tracking changes in code. In a previous lab, you learned about how Git handles changes in files by categorizing its tracked files into unmodified, modified or staged files. Another main tool that Git offers is branching. Branching in Git allows you to diverge from the main branch, or version, of a git repository, and make any changes you need without fear of affecting the main branch until you're ready. This branching feature is one of the most useful and widely regarded features of Git. Companies and developers use the branching feature of Git to safely introduce new features and fix errors in their code.

In this lab, you'll practice using Git safely make changes to a codebase. You'll use Git branching to edit code without fear of impacting your master code until you're ready.

Lab Objectives

Upon completion of this lab you will be able to:

  • Understand the branching strategies of Git
  • Use Git to branch and merge
  • Apply branching strategies in your own codebases

Intended Audience

This lab is intended for:

  • Developers
  • Cloud professionals
  • Anyone interested in using code

Prerequisites

You should be familiar with:

  • Our previous lab on Git commits
  • Basic understanding of the AWS Console is helpful but not required

Updates

July 30th, 2024 - Resolved timeout issue

May 18th, 2022 - Updated the lab to use Cloud Academy's hosted web terminal

May 12th, 2020 - Updated the provisioning block to enforce a more accurate startup time

Environment before

Environment after

Covered topics

Lab steps

Using Git to Clone a GitHub Repository
Learning About Git Branches
Managing Git Branch Workflows