2.5Branches

Take a line of work away from main, then bring it back without leaving anyone's assets behind.

Section 5 of 7 in this chapter

Branching here follows the shape people already know: main is the trunk, a branch forks from it, and a branch is expected to come back. The branch selector sits at the top left of the project view.

  1. 1

    Create a branch

    Open the branch selector and create one. It forks from the current state of main. Nothing is copied and nothing is duplicated in storage — a branch that has changed nothing costs nothing.

  2. 2

    Work on it

    Commits you push while the branch is selected land on the branch, and pulls give you the branch's files. The selector always shows where you are, because pushing a week of work to the wrong line is a bad afternoon.

  3. 3

    Merge back

    Merging applies the branch's file versions onto main as a new commit.

Why merging works on binary files

Because the unit being merged is a file version, not a diff. Merging a branch means "for each file the branch changed, make main's current version the branch's version". There is no reconstruction step and therefore nothing to reconstruct incorrectly. An asset that only ever existed on the branch arrives whole.

The limitation is the honest one: if main and the branch both changed the same binary file, someone has to choose. That is the same choice as a conflict on pull, for the same unavoidable reason.

Was this helpful?

Back to top