What is a Branch?
A branch is a lightweight, movable pointer to a specific commit. Branching lets you diverge from the main codebase, work in complete isolation, and merge back when ready. Creating a branch costs almost nothing.
01.Why Branches Matter
Without branches, every developer would edit the same codebase simultaneously causing constant conflicts and broken code. With branches: develop features in isolation, fix bugs without touching in-progress features, experiment freely and discard if needed. Each branch is independent until you choose to merge.
02.The HEAD Pointer
HEAD is a special pointer that always marks your current position in the repository — the commit your next change will be built upon. Usually HEAD points to a branch name. When you commit, HEAD and the branch pointer both move forward to the new commit together.
Commands
What is a Git branch technically?