Guided Notes

Branching

Why branches exist, creating and switching branches, listing, renaming, and deleting them.

What is a branch?

Slide 1 / 5

A branch is an independent line of development. Creating one lets you work on a feature or fix without touching the main code; when it's ready, you merge it back.

Under the hood, a branch is just a movable label pointing at a commit, so branches are instant and cheap to create. HEAD points to the branch you're currently on, and each new commit moves that branch forward.

← History & Help