Branches

Branches are part of what makes version control systems really useful.

You can go off on an exploratory adventure on a new branch, and know that your commit history is still safe on another branch.

Coding projects often use new branches to work on new features or new ideas. Sometimes they will get merged back into the main branch, sometimes they won't. But having a separate branch is like having a separate work area, where you are safe to make mistakes and break things, while you're main branch is untouched.

Think of branching as a sandwich. Our main branch has the two slices of bread. Maybe we create a new branch to decide what the next topping should be, and then we merge it into our sandwich. You can have as many branches as you want, and as many toppings as you want.

At its core, a branch uses its parent as a starting point.

Here, the purple and green branches started from master but then went off on their own way. We'll discuss how they come together in a bit.

atlassian branch graph

results matching ""

    No results matching ""