A Git branch is a movable pointer to a commit within a Git repository, allowing developers to work on features or fixes independently from the main codebase. Branches enable parallel development by isolating changes until they are ready to be merged. They are lightweight and can be created or deleted without affecting the repository’s history.
Why it matters
Branching supports safe experimentation and structured collaboration. Teams use branches for features, bug fixes, hotfixes, or release cycles. A clear branching strategy helps reduce merge conflicts and improves code review workflows.
Examples
Creating a branch with git branch feature/login or switching with git checkout feature/login. The lesson What Is a Branch? introduces branching fundamentals.