CodeIgniter Forums
How "much" do you keep under version control? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How "much" do you keep under version control? (/thread-12345.html)



How "much" do you keep under version control? - El Forum - 10-15-2008

[eluser]mtbkrdave[/eluser]
Hi Y'all - CI newbie here, making his first post...

I've been poking around with CI under LAMPP for a few days, and I'm ready to start building a practice app. I'd like to keep it under version control, mostly as a best-practice but also because subversion has saved my butt on many an embedded C project, so I'm a big fan.

My question is: Just how "much" of the structure should I keep under version control? The entire CodeIgniter directory, including the framework files as well as my own? Or just the directories containing my project files?

Thanks,
[medic]dave


How "much" do you keep under version control? - El Forum - 10-15-2008

[eluser]drewbee[/eluser]
I keep everything; Even though CI is nice enough to have earlier version's available for download, what happens if you make a core hack, or something similar?

In general, I keep everything (including graphics) in subversion. A little over zealous, I am sure, but I know if something were to happen version'ing has my back Smile

Another scenario could be that you are getting ready for a big CI core update, and as you update everything for some unknown reason everything fails. It would be a good way to back-track the mistakes.

My vote is for all in... Smile


How "much" do you keep under version control? - El Forum - 10-16-2008

[eluser]darrenm[/eluser]
I tend to split my application folders away from the CI core. I then SVN each app and use Ellis Lab svn for the core.

I avoid editing the core at all costs, instead using MY_libraries etc.

However, if I did ever need to edit the core I'd branch off to a whole new project and svn everything.


How "much" do you keep under version control? - El Forum - 10-16-2008

[eluser]mtbkrdave[/eluser]
OK, thanks for the feedback so far!

I think to start, since my "practice" code probably a) won't have many [framework] version-specific dependencies and b) will probably be long forgotten-about when the next version of CI comes out, I'll go with only VC'ing the project files. I can use multiple working directories to just keep my controllers/ and views/ directories under VC to start.

Once I get started on a project that's anything more than practice code, I'll probably go for the all-in approach.

Now another question: would it make sense to keep one's database prototypes in VC as well? I could see keeping a .sql file under VC for each database, containing the tables as that revision of code expects to find them configured. Would seem easy enough to create this automatically with mysqldump then commit it along with the rest of the code.

Thanks,
[medic]dave


How "much" do you keep under version control? - El Forum - 10-16-2008

[eluser]Dan Bowling[/eluser]
I use Migrations for that.


It's on the wiki