201 — Branching & Merging

Master Git branches to work on features independently and merge changes back together. Learn the branching workflow used by professional developers.

Learning Objectives

1
Create and switch between branches
2
Understand when and why to use branches
3
Merge branches together
4
Resolve simple merge conflicts
Step 1

Create a workspace for this lesson

Set up a fresh directory with an initialized Git repository and some initial commits to work with.

Commands to Run

mkdir -p ~/git-practice/lesson-201
cd ~/git-practice/lesson-201
git init

What This Does

We're creating a new workspace for this lesson to keep things organized. Starting fresh helps you focus on branching concepts without confusion from previous work.

Expected Outcome

You should see "Initialized empty Git repository" message and be in the lesson-201 directory.

Pro Tips

  • 1
    Use `pwd` to verify you're in the correct directory
  • 2
    Each lesson uses its own directory to avoid confusion

All Steps (0 / 18 completed)