.gitignore for Craft CMS
2 ignore rules for Craft CMS, ready to copy into your repository.
Content management system
The complete .gitignore for Craft CMS
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 02:27:24 UTC
# Technologies: Craft CMS
### Craft CMS ###
/craft/storage/*
!/craft/storage/rebrand
What these Craft CMS rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
General
| Pattern | What it ignores |
|---|---|
/craft/storage/* |
Craft 2 Storage (https://craftcms.com/support/craft-storage-gitignore) not necessary for Craft 3 (https://github.com/craftcms/craft/issues/26) |
!/craft/storage/rebrand |
General |
How to use this .gitignore for Craft CMS
- Copy the Craft CMS rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.