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.
git clone | Nothing to do. Mount the project and it's there |
git status | vcs status |
git diff | vcs diff |
git log | vcs log |
git show <commit> | vcs show <commit> |
git add, then git commit | vcs commit. No staging: it takes everything pending, or the paths you name |
git checkout -- <path> | vcs restore <path> |
git branch, git switch | vcs branch create, vcs branch switch |
git merge | vcs merge |
git rebase | vcs rebase |
git commit --amend | vcs amend |
git rebase -i | vcs reword, vcs squash, vcs drop |
git reset <commit> | vcs branch rehead. It keeps your pending changes |
git push, git pull | Nothing 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.
| Topic | ||
|---|---|---|
| Staging | git add picks what goes into a commit | No staging area. A commit takes everything pending, or only the paths you name |
| Syncing | git push and git pull | Automatic. Commits sync as soon as you make them |
| Pull requests | A separate thing, on GitHub or a similar site | Built into the branch. See Pull requests below |
| Large files | Git LFS, set up separately | Nothing to set up. Every file is stored the same way |
| Branch names | / and . are allowed, as in feature/sky | Only 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 file | The file stays tracked until you run git rm --cached | The rule applies at once. The file shows as deleted in "Pending", and stays on disk |
For .gitignore, write renders/*.png, not renders/**.png.
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.
| To | In the app | On the command line |
|---|---|---|
| Open a pull request | Create a branch. It already knows its target | vcs branch create |
| Review the changes | "Changes", showing what changed in each file | vcs log, then vcs show for each commit |
| Catch up with the target | Right-click the branch in "Branches", then "Update…" | vcs rebase |
| Merge it | Right-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.
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 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 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>/headEdit 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 logFrom 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.
Git logo by Jason Long, licensed under Creative Commons Attribution 3.0. Git and the Git logo are trademarks of Software Freedom Conservancy, Inc.