.gitignore for Yii
6 ignore rules for Yii, ready to copy into your repository.
PHP web application framework
The complete .gitignore for Yii
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:34:17 UTC
# Technologies: Yii
### Yii ###
assets/*
!assets/.gitignore
protected/runtime/*
!protected/runtime/.gitignore
protected/data/*.db
themes/classic/views/
What these Yii rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
General
| Pattern | What it ignores |
|---|---|
assets/* |
General |
!assets/.gitignore |
General |
protected/runtime/* |
General |
!protected/runtime/.gitignore |
General |
protected/data/*.db |
General |
themes/classic/views/ |
General |
How to use this .gitignore for Yii
- Copy the Yii 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.