Branch
One line of development inside a repository.
An independent line of development in a Git repository.
A branch lets developers work on changes without directly changing another branch such as main.
Branches allow multiple lines of development to exist in the same repository.
Simple Definition:
A branch is a separate line of code development.
Think of a branch as creating a side road from the main road.
You can work on the side road and later reconnect it.
Branches help teams:
Branches are used in:
Concept:
main ↓ feature/order-validation
Developer changes the feature branch without directly editing main.
One line of development inside a repository.
The whole project containing branches and history.
Branch ≠ Repository
Branches allow parallel development.
Feature work is often done outside main.
Branches can later be merged.