CodeIgniter 用 .gitignore
CodeIgniter 用の除外ルール 15 件。そのままリポジトリにコピーして使えます。
PHP Web フレームワーク
CodeIgniter 用 .gitignore の完全版
# LFGitignore によって生成 - https://lfgitignore.com
# 作成日:2026-10-31 21:49:22 UTC
# 技術:CodeIgniter
### CodeIgniter ###
*/config/development
*/logs/log-*.php
!*/logs/index.html
*/cache/*
!system/cache/*
!*/cache/index.html
!*/cache/.htaccess
user_guide_src/build/*
user_guide_src/cilexer/build/*
user_guide_src/cilexer/dist/*
user_guide_src/cilexer/pycilexer.egg-info/*
application/logs/*
!application/logs/index.html
!application/logs/.htaccess
/vendor/
CodeIgniter のルールで除外されるもの
以下の各パターンと、.gitignore に含める理由を説明します。
一般的な
| パターン | 除外対象 |
|---|---|
*/config/development |
一般的な |
*/logs/log-*.php |
一般的な |
!*/logs/index.html |
一般的な |
*/cache/* |
一般的な |
!system/cache/* |
一般的な |
!*/cache/index.html |
一般的な |
!*/cache/.htaccess |
一般的な |
user_guide_src/build/* |
一般的な |
user_guide_src/cilexer/build/* |
一般的な |
user_guide_src/cilexer/dist/* |
一般的な |
user_guide_src/cilexer/pycilexer.egg-info/* |
一般的な |
application/logs/* |
CodeIgniter 3 |
!application/logs/index.html |
一般的な |
!application/logs/.htaccess |
一般的な |
/vendor/ |
一般的な |
この CodeIgniter 用 .gitignore の使い方
- 上の CodeIgniter 用ルールをコピーするか、ファイルを直接ダウンロードしてください。
- Git リポジトリのルートに .gitignore という名前のファイルを作り、ルールを貼り付けます。
- 対象のファイルがすでに追跡されている場合は、git rm -r --cached . を実行して再度コミットしてください。Git の除外ルールは未追跡のファイルにのみ適用されます。
- チーム全員で同じルールを共有できるよう、.gitignore をコミットします。