CodeIgniter and GIT: What not to check-in? CodeIgniter and GIT: What not to check-in? codeigniter codeigniter

CodeIgniter and GIT: What not to check-in?


My practice is to track the entire framework except user_guide, application/cache and application/logs.

Tracking system/ is helpful because when CI has updates from they usually amount to simply replacing system/ and its contents. Nice to have commits available should you need to revert to a prior version of CI.

GIT repositories are so light weight it's hardly worth the effort to segregate files as you describe. I have a CI repo that's about six years old containing a huge number of commits representing tens of thousands of changes and multiple versions of CI. The size of the .git folder is about 39MB. That's a trivially small file for a modern computer. Checking out any given branch or reverting a commit happens in seconds.

Regarding CI's file structure. The folders inside application/ (controllers, models, libraries, etc.) more or less require that relationship. The views folder is an exception and can be in a non-standard location. Same with application and system folders. The file index.php can be edited to change where those folders are to be found and even what they are named.

To change where controllers live you would have to extend (or hack) the CI_Loader class. Not impossible but hardly worth the effort.