← Software Knowledge · Development & Git
PART VIII · DEVELOPMENT & GIT

Branch

An independent line of development in a Git repository.

01

What is it?

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.

02

Think of it like...

Think of a branch as creating a side road from the main road.

You can work on the side road and later reconnect it.

Main
Feature Branch
Changes
Merge
03

What does it do?

Branches help teams:

Develop Features
Fix Bugs
Experiment Safely
Work in Parallel
Prepare Releases
Review Changes Separately
04

Where is it used?

Branches are used in:

Git
GitHub
Pull Requests
Feature Development
Bug Fixes
Release Management
05

Example

Concept:

main
↓
feature/order-validation

Developer changes the feature branch without directly editing main.

06

How it connects

Main
Create Branch
Commits
Pull Request
Merge
07

Do Not Confuse

Branch

One line of development inside a repository.

Repository

The whole project containing branches and history.

Branch ≠ Repository

09

What to Remember

Branches allow parallel development.

Feature work is often done outside main.

Branches can later be merged.

MainBranchChangeMerge
↑