Skip to content

Developers

Filament for Git users

Already know Git? Most of it carries over. This page maps Git's commands to Filament's, and lists the few things that work differently.

Commands

Every command below starts with filament, which you install first. Run any of them with --help for its options.

Install the command

In GitIn Filament
git cloneNothing to do. Mount the project and it's there
git statusvcs status
git diffvcs diff
git logvcs log
git show <commit>vcs show <commit>
git add, then git commitvcs commit. No staging: it takes everything pending, or the paths you name
git checkout -- <path>vcs restore <path>
git branch, git switchvcs branch create, vcs branch switch
git mergevcs merge
git rebasevcs rebase
git commit --amendvcs amend
git rebase -ivcs reword, vcs squash, vcs drop
git reset <commit>vcs branch rehead. It keeps your pending changes
git push, git pullNothing to do. Filament syncs all the time
.gitignore.gitignore. Same file and pattern syntax, with the two differences below

What's different

Most of Git carries over. These are the places where Filament works differently.

TopicIn GitIn Filament
Staginggit add picks what goes into a commitNo staging area. A commit takes everything pending, or only the paths you name
Syncinggit push and git pullAutomatic. Commits sync as soon as you make them
Pull requestsA separate thing, on GitHub or a similar siteBuilt into the branch. See Pull requests below
Large filesGit LFS, set up separatelyNothing to set up. Every file is stored the same way
Branch names/ and . are allowed, as in feature/skyOnly letters, numbers, - and _. Filament refuses other names, so write feature-sky
.gitignore patterns** can match inside a name** inside a name doesn't match
Ignoring a committed fileThe file stays tracked until you run git rm --cachedThe rule applies at once. The file shows as deleted in "Pending", and stays on disk

For .gitignore, write renders/*.png, not renders/**.png.

Ignore files

Pull requests

There's no separate pull request. A Filament branch is the branch and its pull request in one.

Each branch records its target: the branch it plans to merge into. A new branch targets the branch you were on, unless you pick another with vcs branch create --target. vcs branch info shows it.

ToIn the appOn the command line
Open a pull requestCreate a branch. It already knows its targetvcs branch create
Review the changes"Changes", showing what changed in each filevcs log, then vcs show for each commit
Catch up with the targetRight-click the branch in "Branches", then "Update…"vcs rebase
Merge itRight-click the branch in "Branches", then "Merge…"vcs stack, or vcs merge <your-branch> --branch <target>

vcs stack puts your branch's commits onto its target as they are, and closes the branch. It works only while the target hasn't moved since your branch last caught up with it.

vcs merge works from the other side: it merges the branches you name into the target, one merge commit each, and leaves them open. If it records a conflict, resolve it with vcs conflict list, show and take, then commit.

In the app, "Merge…" picks for you. It puts your commits on as they are when it can, and adds a merge commit when it can't. "Close source branch" is ticked already. Merging, step by step.

There's no review button. To get a second opinion, ask an agent to review the branch in a session.

Review and merge

One change, side by side

Here is the same work in both, on a new computer. Get a project with large files, start a branch, then commit a change and share it.

Git: 6 commands and a website
$ git lfs install
$ git clone git@host:studio/harbor.git
$ git checkout -b lighting-pass
$ git add renders/sky.psd
$ git commit -m "Warmer sky"
$ git push -u origin lighting-pass
Filament: 3 commands
$ filament vcs branch create --name lighting-pass
$ filament vcs branch switch --name lighting-pass
$ filament vcs commit -m "Warmer sky"

Both run in a terminal open in the project folder; for Git, that's after the clone. git lfs install is needed once per computer, before the first clone of a project with large files.

In Filament the project folder appears when you click "Mount" in the app, with no download first. After the commit there's nothing left to do: it's synced, and the branch is the pull request. Your team sees it unless the project makes new branches private. With Git you still open a pull request on the website.

Several branches at once

In Git you'd make a worktree to work on two branches side by side. In Filament every branch already has its own folder, inside the project:

.filament/branches/by-name/<branch>/head

Edit files in that folder and the changes land on that branch. Each branch keeps its own pending changes, so the branch your project folder shows doesn't change.

Inside a branch's folder, the vcs commands that take --branch act on that branch. Only vcs branch delete, close and open still need --branch. vcs status names the branch on its first line:

cd .filament/branches/by-name/lighting-pass/head
filament vcs status
filament vcs commit -m "Add bounce light" lights/bounce.usda
filament vcs log

From the project folder or another branch's folder, add --branch to act on any branch, not just the one you're on:

filament vcs status --branch lighting-pass
filament vcs commit --branch lighting-pass -m "Add bounce light"

Several people or agents can each work in their own branch folder at the same time, on one computer, without getting in each other's way.

Command reference

Git logo by Jason Long, licensed under Creative Commons Attribution 3.0. Git and the Git logo are trademarks of Software Freedom Conservancy, Inc.