An alternate timeline for the project

Think of a branch as an alternate timeline for a project. Two developers start from the same saved version of an online shop’s files: one redesigns checkout, while the other fixes a bug. Each branch collects its own changes without altering the main version.

Git keeps track of the changes on each branch so the team can review and combine them later. A branch does not update the live product by itself.

Bring the changes together

When work is ready, a developer opens a pull request to get feedback before merging it into the main version. If two branches changed the same part of a file, a person may have to decide how the changes fit together. This is a merge conflict.