Guides
Ignore files
Some files don't belong in the project's history, like render caches or build output. List them in a .gitignore file and Filament leaves them alone.
Why ignore files
Every file you change shows up in "Pending", ready to commit. Files your tools make for themselves, like caches, previews and build output, would show up too.
New or changed ignored files never show up in "Pending", so they can't end up in a commit by mistake.
Ignoring a file or folder
- Open your project folder.
- Create a text file called
.gitignoreat the top of the project, if there isn't one. - Add one line for each file or folder to ignore.
- Save it.
Finder hides names that start with a dot. To see them, press Command-Shift-period.
render-cache/
*.tmp
/buildFilament reads the same .gitignore files as Git, and the lines work the same way, with two differences. One is ** inside a name, below. The other is files you've already committed.
Writing the lines
render-cache/ignores every folder with that name, and everything in it.*.tmpignores every file ending in.tmp./buildignores only thebuildfolder at the top of the project.!keep.tmpbrings one file back that an earlier line ignored.
You can also put a .gitignore in any folder. Its lines then apply to that folder and everything inside it.
One difference from Git: ** inside a name, as in renders/**.png, doesn't match anything. Write renders/*.png instead.
What happens to ignored files
- They stay on your computer, and you can open them as usual.
- They never show up in "Pending" as new or changed, and never go in a commit.
- They don't sync to other people or your other computers. A big cache your tools rewrite all the time costs no upload.
The .gitignore file itself is part of the project, so everyone working on it gets the same rules.
Files already committed
A line in .gitignore also applies to files you've already committed. Git keeps tracking those files. Filament doesn't.
As soon as you save the line, each committed file it matches shows up in "Pending" as deleted. The file stays on your computer, so nothing is lost.
- To take the files out of the project, commit those deletions. The files still stay on your computer. Earlier commits still hold them, so you can go back to them.
- To keep a file in the project, change the line so it doesn't match the file. Or add a
!line that brings it back. A!line can't bring back a file inside a folder that a line ignores.