gitcakephpcakephp-2.0cakephp-2.1

Why does CakePHP put app/Config in .gitignore by default?


Why does CakePHP put app/Config in .gitignore by default?

I understand putting app/tmp in .gitignore, and also understand why they've put the root /plugins and /vendors directorys, since they are intended for plugins and vendors that are shared across multiple projects. But why app/Config? I would have thought that contains exactly the kind of stuff you DO want in version control, such as database.php and bootstrap.php.


Solution

  • I'd imagine it would have something to do with the database configs are actually what you DONT want in version control.

    Imagine If you have the database config file in your git repo, and someone pulls, they will have YOUR database settings, then they will edit the database config file to suit their needs, and now it just becomes a game of table tennis with database.php files. And quite frankly that would be very very, annoying.

    I mean, if everyone has the same config settings, it would work and might be a tad handy, but who has all the database configs across machines?

    bootstrap.php on the other hand i'll somewhat agree with, since the bootstrapping is usually for a project and the project relies on those dependencies. Although that being said, what if you want to use different plugins for different environments? Such as using sendgrid.com to send emails on your development copy, and using SMTP on the live server?

    In my opinion its just simpler to leave the config directory ignored. It leaves the configuration to the developer.