Skip to main content
  1. Learn center
  2. Software Development
  3. Guides
  4. Git tutorial
  5. Git collaboration
  6. Branches
  7. What is a Git branch?
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

What is a Git branch?

A Git branch is essentially an independent line of development. You can use branching when working on new features or bug fixes to isolate your work from that of other team members.

Diagram of git branches.
A git branch is an independent line of development taken from the same source code.

Separate branches can be merged into one branch. The diagram below illustrates how development can take place in parallel using branches.

Diagram of multiple projects.
Multiple development projects are taking place using the same source code.

Changes in the primary or other branches will not affect your branch unless you pull the latest changes from those branches.

It is a common practice to create a new branch for each task (i.e., bug fixes, new features, etc.). This method lets others easily identify what changes to expect and simplifies backtracking.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life