What version control system do you use for web apps? |
[eluser]theswede[/eluser]
Hi, I've been copying source code back and forth between my desktop and my clients' servers for 6 months now, it's getting tiresome. So, I want to try out a version control system but can't decide which one to choose. SVN seems to be the most commonly used one, but... how do you have it set up? Is it possible to have one repository for all your projects, with development and live versions on separate servers? Please share your experiences using SVN (or similar version control system). Thanks in advance, theswede
[eluser]Phil Sturgeon[/eluser]
With SVN you can structure the folders however you want. So if you want one repo per project, you can. If you want multiple projects in one repositry, go ahead, it wont complain! When you submit to your repositry your code is not executable. Meaning just because its on a SVN server, does not mean its on a web server. Therefore you must export the SVN before you can put it online. This means that you can test on local, commit to SVN when its all working nicely and do a nightly export & upload to your live server with code you know works. Grab TortoiseSVN if you use windows, and SubWeaver if you are unlucky enough to be stuck on Windows & Dreamweaver for the short-term future like myself. If not, I found EasyEclipsePHP was very good for SVN management on a Mac.
[eluser]ejangi[/eluser]
I've seen git mentioned more and more online these days, but personally I (also) vouch for using EclipsePHP with the subclipse plugin. You could also use something like capistrano to deploy straight from the SVN repository (and roll-forward/back with a simple terminal command). The only thing you will probably need to change from local to live is your config, which is thankfully all kept in the one spot. But, what I do locally is setup everything exactly like the live (database names, usernames, passwords), so that all I have to change between local and live is the base_url.
[eluser]Phil Sturgeon[/eluser]
[quote author="ucantblamem" date="1199088343"]The only thing you will probably need to change from local to live is your config, which is thankfully all kept in the one spot. But, what I do locally is setup everything exactly like the live (database names, usernames, passwords), so that all I have to change between local and live is the base_url.[/quote] No no no, thats the gayboy way of doing things! Put this in your config files. Code: if($_SERVER['SERVER_NAME'] == 'localhost'): This works great in the database config too: Code: if($_SERVER['SERVER_NAME'] == 'localhost'):
[eluser]Developer13[/eluser]
There's also Bazaar, which Canonical uses for its Ubuntu distribution: http://bazaar-vcs.org/
[eluser]theswede[/eluser]
Thank you for the great responses. I will let you know how I have my version control system set up when it's done. Til then, tuudiluu
[eluser]Peter Ivanov[/eluser]
Hello, does somebody know some PHP based version control system
[eluser]Peter Ivanov[/eluser]
WOW this seems to be really nice system for updating web applications
[eluser]Grahack[/eluser]
I love this trick, by a 'two-posts' igniter. Never tried live though. Thanks for the interesting links! |
Welcome Guest, Not a member yet? Register Sign In |