Knowledge Maxxing
← Back to topic library
Dev MaxxingBeginnerGit75 sec

Git branch

A Git branch is an independent line of commits, letting changes be developed separately from the main history until they're ready to be merged in.

Prerequisite: Git commit

What matters

Branches let multiple people or features be developed in parallel without one person's unfinished work disrupting everyone else's copy of the project.

Example

A developer might create a branch called 'add-search-feature', commit their work there, and only merge it into the main branch once it's complete and reviewed.

Common misconception

Creating a branch does not copy the entire project into a separate folder; it is a lightweight pointer to a specific line of commits within the same repository.

Recall question

Why do branches let multiple people work in parallel without interfering with each other?

Keywords and related concepts

Git branchparallel developmentmerginggit commit

Related topics

Git commit
Dev MaxxingBeginner
Merge conflict
Dev MaxxingBeginner