6

Which folders should I ignore when using version control on a project developed on the CodeIgniter framework?

I am already ignoring the application/cache folder, but are there any else?

Cœur
  • 37,241
  • 25
  • 195
  • 267
longneck
  • 11,938
  • 2
  • 36
  • 44

2 Answers2

6

You can ignore any application generated logs and any development specific configuration files. Here's a commonly used .gitignore file for CodeIgniter:

*/config/development
*/logs/log-*.php
*/logs/!index.html
*/cache/*
*/cache/!index.html

https://github.com/github/gitignore/blob/master/CodeIgniter.gitignore

birderic
  • 3,745
  • 1
  • 23
  • 36
3

Beyond the default github codeigniter template provided by birderic, (at https://github.com/github/gitignore/blob/master/CodeIgniter.gitignore for good measure) I also like to simply exclude any php file in the /config director with

*/config/*.php

Some third party apps, like HybridIgnite, like to put their configuration files in the /config directory and a limited config block might enable on of these files to be tracked... Better safe than sorry...

To make it clear how config files should work, I keep a copy of the default files (with no passwords of course) in a seperate config_template directory.

HTH, -FT

Ben Everard
  • 13,652
  • 14
  • 67
  • 96
ftrotter
  • 3,066
  • 2
  • 38
  • 52