Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

1.3.3. Branches: Parallel Lines of Work

💡 First Principle: A branch is a lightweight, movable pointer to a specific commit — nothing more. Because branches are just pointers rather than full copies of the project, creating one is nearly instant and costs almost nothing, which is exactly what makes it safe to branch constantly for every new piece of work.

Every repository starts with one default branch (conventionally named main). Creating a new branch lets you make commits on a separate line of history — experimenting, building a feature, or fixing a bug — without touching main at all. Later, a branch's changes can be merged back, folding its commits into another branch's history.

⚠️ Exam Trap: Creating a branch does not create a separate copy of every file on disk. It creates a new pointer into the same underlying commit history — which is why branching in Git is fast even on very large repositories.

Reflection Question: Two branches, main and feature/login-page, both started from the same commit. If you make three commits on feature/login-page and none on main, what exactly is different between the two branches right now?

See how it connects
Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications