Branches in Git let you diverge from the main line of development to work on something in isolation — without affecting the main code. They're lightweight and central to Git workflows, enabling parallel work and safe experimentation.
What a branch is
A branch is a MOVABLE POINTER to a commit. The default is usually "main".
→ creating a branch = creating a new pointer (cheap/instant — not a copy of files)
→ commits on a branch advance that branch's pointer
→ branches let you work on different things in parallel, isolated from each other
Branches are (just pointers to commits, not copies) — so creating and switching branches is fast and cheap, which is why Git branching is used heavily.
