Concepts
Branches
A branch is a separate line of work. You change things on it without touching anyone else's work, then merge it back.
Branching
Think of a branch as a copy of the project that you can work ahead on. Each branch also knows where it's headed: the branch it plans to merge into, called its target.
Every project has a main branch, usually called main, where finished work comes together. So you never have to tell anyone where the work should go. The branch already says "this is meant for main".
Main has three commits. Its file is on the left.
Every branch has a permanent ID. Renaming a branch keeps its history and its color.
Creating
The mini map sits across the top of the project screen. It shows the branch you're on and where it came from.
- Click "branch" in the mini map.
- Type a name for your branch in "Name".
- In "target branch", choose the branch your work will merge into, usually main. It's set to the branch you're on at first.
- Click "Create". Your branch starts from the target's newest commit, or from an older one you pick in "commit".
Filament switches you to the new branch.
A branch name can hold only letters, numbers, dashes (-) and underscores (_). Filament refuses any other character, such as / or a period. The app turns spaces into dashes for you.
Already have pending changes? The "Create a branch" window offers to move them to the new branch. It ticks that for you when the branch starts from the newest commit.
Branch and merge, step by step
Switching
Your project folder shows one branch at a time. To switch, right-click a branch in "Branches", in the project's sidebar, and choose "Checkout". That makes it the branch your project folder shows.
Pending changes stay with the branch you leave. Switch back, and they're there again.
Close files in your other apps before you switch. A file that's already open stays the old branch's file.
Several at once
Every branch also has a folder of its own, inside the project folder. For a branch called harbor-dusk-grade, it's .filament/branches/by-name/harbor-dusk-grade/head. The head folder holds the branch's files as they are now. Change files there and they become pending changes on that branch, without switching. Next to it, commits holds each commit's files, to look at but not change.
To commit them, click "Branches" in the project's sidebar, then the row for that branch's pending changes in its graph. It has its own commit message box and "Commit" button.
Finder hides folders that start with a dot: press Command-Shift-period to see them. On Linux, most file managers show them with Ctrl+H.
This lets you and your agents work on several branches at the same time on one computer.
Colors
Every branch has its own color, and keeps it in the mini map, the commit graph and chats. Main and the branch you're on are the exceptions: main is near-black, and the branch you're on is purple. A branch's label starts with the branch mark, a small branch icon, and shows what kind of branch it is.
| Label | What it means |
|---|---|
| main | Main. Its color is near-black, or near-white in dark mode. |
| harbor-dusk-grade | The branch you're on. Purple, with a check on the branch mark. |
| kaze-helmet | Any other branch, in its own color. There are nine colors, so two branches sometimes share one. |
| intro-recut | A closed branch. Grayed out, with an X on the branch mark. |
| client-preview | A private branch, with a padlock after the branch mark. Only its owner, the people it's shared with, and project or organization admins can see it. |
A label can also carry badges:
| Badge | What it means |
|---|---|
| teaser3 pending changes | Pending changes, a yellow badge: edits on this branch that you haven't committed yet. |
| teaser2 commits behind | Commits behind, a red down arrow and a count: its target has 2 commits this one doesn't. Click "update" to bring them in. |
| kaze-helmet1 unresolved conflict | Conflicts to resolve, a red badge with "!" and a count. Until then, the branch can't merge. |
Open and closed
An open branch is still in progress. A closed branch is finished: merged, or set aside.
- Two branches can't share a name, even when one of them is closed.
- To reuse a closed branch's name, delete that branch first, or choose another name.
- Closed branches are hidden until you click "Show closed".
History
Filament keeps a record of everything done to a branch: who did it, and when. The app doesn't show this record yet, and there's no button to undo a branch action.
Merging
A merge brings a branch's work into its target. When it's done, Filament says "Merged" and names both branches.
If you click "update" on the branch first, each of its commits goes in as its own step. If not, and the target has new commits, the merge adds one merge commit that holds all the branch's changes. Either way, all of the branch's work ends up on the target.
Branch and merge, step by step
Deleting
To delete a branch, right-click it in "Branches" and choose "Delete". The app asks you to confirm, and calls deleting permanent. There's no way to bring a deleted branch back from the app.
Might you need the work again? Choose "Close" instead. A closed branch keeps all its commits, and "Reopen" brings it back.