Master Git branches to work on features independently and merge changes back together. Learn the branching workflow used by professional developers.
Set up a fresh directory with an initialized Git repository and some initial commits to work with.
mkdir -p ~/git-practice/lesson-201
cd ~/git-practice/lesson-201
git init
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.
You should see "Initialized empty Git repository" message and be in the lesson-201 directory.