Intern Track Roadmap

Git branching & checkout

Git branching and checkout covers working on independent lines of commits while main stays deployable. A branch is a lightweight pointer to a commit, and HEAD marks your current position. The lessons show how to create and switch branches with git switch and git checkout -b, inspect and compare them, and rename or delete them safely. They also cover detached HEAD, pushing and tracking branches on a remote, and building one feature on its own branch from the first commit to the push.

What you'll learn

  • ✓How a branch works as a lightweight pointer to a commit, with HEAD marking your position
  • ✓Creating and switching branches with git switch, switch -c and checkout -b
  • ✓Listing and comparing branches with git branch -a, -vv, git diff and git log
  • ✓Renaming and deleting branches with -m, -d and -D, and recovering commits with git reflog
  • ✓What detached HEAD means and how to keep work made in that state
  • ✓Pushing, tracking and pruning branches on a remote
Free preview · Lesson 1 3 min read

Why branches: isolating work without touching main

Every commit across the last three courses landed on the same branch, main, one after another. That works fine for a solo learning exercise. It breaks down the moment real work looks like this: you're halfway through a risky refactor, a critical bug report comes in, and main needs an emergency fix:…

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...