How to get started with version control and PHP [closed] - php

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have absolutely no idea about version control. Only that it can be very useful in many ways.
I have found a few related questions but none that start from the absolute beginning.
I am the only developer at my work using Mac OS X and traditionally just been using FTP.
Can anyone help me with version control in relation to PHP projects (does it matter)?

Yes, try it out, it's worth it. And the language you are using doesn't matter. It's working great with PHP for me and it will for you too.
Benefits
If you are the only developer, it is indeed easier to go without version control. However, you will find great benefits to using a version control system. Some of the easiest benefits will be:
Never wondering what is your latest version once you go back to a project (no more myproject090201-archive2-final6.zip)
Never fear to start off some major refactoring, if you make a mistake on your file, you'll just rollback to the latest version
If something stops working in your project and you have the feeling it worked at one point, you can test some of the prior versions easily and look at the difference between the working version and the non-working version to find what broke the code
Additional backup of your current project, and even better if it's not on your machine... of course, additional points for backing up your version control system, we're never too cautious, you don't want to have to restart that month-long project do you?
Choices
As some have said, you have a few choices for your version control system and I guess you'll want a free one to begin. There are a few excellent commercial products but the free ones have nothing to be ashamed of. So here are some very popular free version control systems:
Subversion (also called SVN)
Git
Mercurial
Bazaar
Centralized versus distributed
Subversion has been there for a while and it's one classified as 'centralized'. Meaning everyone will always go fetch the latest version and commit their latest work to one central system, often on another system although it can easily be on your own machine. It's a process easy to understand.
The three others are called 'distributed'. There's a lot of different possible processes as it's a more flexible system and that's why those three newcomers are getting a lot of traction these days in open source projects where a lot of people are interacting with one another. Basically you are working with your own revisions on your own machine, making as many copies as you need and deciding which versions you share with other people on other computers.
The trend definitely seems go towards distributed system but as those systems are more recent, they are still missing the GUI tools that makes it really user friendly to use and you might sometimes find the documentation to be a bit lighter. On the other hand, this all seems to be getting corrected quickly.
In your case, as you are working alone, it probably won't make a big difference, and although you'll hear very good points for centralized and distributed systems, you'll be able to work with one or the other without any problems.
Tools
If you absolutely need a GUI tool for your Mac, I'd then choose SVN to get initiated to source control. There are two very good products for that (commercial):
Versions
Cornerstone
And a few other ones (such as the free svnX) that are becoming a little bit old and unfriendly in my opinion but that might be interesting trying anyway.
If you don't mind not using the GUI tools, with the help of Terminal you'll be able to do all the same things with a few simple command lines with any of the aforementioned systems.
Starting points
In any cases, you'll want some starting points.
For Subversion, your first stop must be their free book, Version Control with Subversion. Take a few hours of your day to go through the chapters, it'll be time well invested. The introduction chapters are a good read even you don't want to use Subversion specifically because it'll get you to understand version control a little bit better.
For a distributed system, I've had fun with Mercurial but it's an easily flammable subject so I'll let you make your own choice there. But if you end up looking at Mercurial, have a look at this blog post, it was an excellent starter for me that'll get you up and running with the basics in a few minutes if you're already a bit accustomed to version control in general. Anyway, drop by Mercurial's homepage and have a look at the Getting Started section of the page.
Conclusion
Give it a go, invest a day trying it out with a few bogus files. Try out renaming files and directory, erasing, moving things around, committing binary files versus text files, resolving conflicts and reverting to older versions to get a hang of it. These are often the first few hurdles you'll encounter when playing with version control and it'll be painless if it's on a non-production project.
In any cases, it's something well-worth learning that'll be helpful with your solo projects as well as if you end up working with other developers at your current job or your next one.
Good luck!

The type of code is irrelevant.
One open-source and popular version control system is Subversion and there is a very good overview/manual here.

I use Git for PHP development.
It's fast, flexible, reliable, clean (CVS and SVN create a lot of hidden folders that I personally don't like).
Its distributed nature allow to work the way you want (with or without a central repository).
You can find more about it here:
Gitmagic
Speed Benchmarks

Moreover, you can get the Eclipse PDT (PHP Plugin) and use Subclibse in the IDE.

Versions is working well for another developer I work with. Additionally, if you are using Textmate the SVN bundle provides pretty much all you need for most parts of the Subversion workflow. I really like it.
The Project Plus plugin takes it a step further by adding small unobtrusive badges to versioned files in the project tree, showing at a glance the state of files in a project.

If you're on a Mac, do yourself a favor and pick up Versions, a beautifully designed (and highly functional) Subversion GUI. You'd do best to learn the terminology and get an idea of how Subversion works using a GUI before you jump to the command line. Once you're able to commit revisions of your code and run updates to get other people's work, then go back and read the red bean book (it really is the best way to learn Subversion in-and-out).
http://versionsapp.com/

use bazaar http://bazaar-vcs.org/
it's very nice and you can start using it in minutes.

Check out other options too - Miscrosoft's TFS (this not only used for source control system but for defect tracking, project management etc etc) , Bazaar, Git are popular ones.

Alex,
Version control (and some will scathe me for this statement) is not a trivial matter, and even very experienced developers get themselves into trouble. The most frequent causes for frustration are limitations of a particular product (Visual Source Safe is a famous one), and members of a team not following the same process, or not understanding the process at all.
This should not stop you from looking into using a source control tool - the opposite is the case. You can only use a tool effectively if you understand what it does and why.
I would recommend that you look into CVS. It has been around for many years, it is relatively simple to install, set up, and use, and while there are GUI clients available for most platforms, learning it from the command line may provide the best access to its features.

Related

Version control for PHP Development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have been hearing a lot about the advantages of using a version control system and would like to try one. I was doing freelance web development in PHP for the past 2 years, two months back I hired two more programmer to help me. I will be hiring one more person soon. We maintain 4 websites, all of which are my own, which are continuously being edited by one of us. I learned PHP by myself and have never worked in any other firms. Hence I am new to version control, unit testing and all.
Currently, we have development servers on our workstations. When we edit a particular section of a site, we download the code for that particular section (say /news/ or /movies/ or /wallpapers/ ) from the production server to the dev server, makes the changes locally and uploads to the production server (no code review / testing). Because of this, our dev server is always out of date from our prod server. Occasionally, this also create problem when one of us forgets to download the latest copy from prod and overwrites the last change. I know this is very very foolish, but currently our prod server is the only copy that has all the updates and latest changes.
Can anyone please suggest which is the best version control system for me? I am more interested in distributed version control, since we don't have a central backup for all our code. I read about Mercurial and Git and found that Mercurial is used in several large open source projects by Mozilla, Sun, Symbian etc. So which one do you think is better for me? Not only version control, if there are any other package that I can use to make my current setup better, please mention that too :)
It sounds like Git can accomplish your goals quite well. As it's distributed, it's excellent for working locally since you can perform most operations (commit, revert, diff, patch) without connecting to a central server. You can also avoid that ugly moment of someone pushing new code to production while someone else is working on it, and then having the complicated task of merging those two versions of the code together (git provides a useful tool for doing this called rebase).
You noted there's some big projects using Hg (Mercurial), but there's some pretty big ones using Git, like the Linux Kernel, X.org, Android and Debian.
I use git for all my sites: it's lightning fast, efficient, and easy to use.
Edit: If you want to get into using Git, I'd recommend doing some reading before jumping right in. Starting off on the wrong foot can have some terrible implications later on. If you follow an Agile Workflow, you might want to check this out. Here's a website I learned most of my Git know-how from.
Version control is an incredible tool even when you're working alone, and when you are working with someone else it's indispensable. I would recommend using git. It's very fast, has a really great set of available tools, and of course has github.com. Mercurial is basically just as good as git, but it runs a little slower and doesn't have github.
For why to use git, please read http://whygitisbetterthanx.com/
Here's a nice-looking tutorial on getting started with git: http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html
You can use SVN, Git, Mercurial.
The biggest challenge is having everyone be disciplined in using version control and not getting lazy.
Definitely Mercurial. Although you can use either Git or SVN, Mercurial is better for two reasons:
Vs Git: Good integration with Windows.
Vs SVN: It's distributed.
If you don't want to run yourself a Mercurial server (which is pretty easy anyway), there are many services available. Kiln + FogBugz is an EXCELLENT combination. There's also CodeBaseHQ (also supports Git and SVN), Bitbucket, and many more.
Before you jump onto it I strongly recommend you read at least Joel Spolsky's tutorial, but I strongly recommend you also read Mercurial: The Definitive Guide.
I am sorry, I had no intention of starting a DVCS holy war. I am going to try Git.
Yes, version control will help. To get started, I see two important issues for you:
hosted or self-managed? Do you want to host this yourself on a server, or want a service to take care of it for you? There are reasons to go either way, but if you're not that into managing the server look for a hosted option.
SVN or Git There are others, but these are the top open source contenders.
Pros and Cons (my opinion):
SVN: Good tutorials and fairly easy to get up-to-speed with. The training requirement is small (I've done a bit of it). SVN works really well with a co-located team, lots of projects, etc. With a limited number of branches (you may not need any), it is solid. There are plenty of integrations with other tools.
Git: Getting started can be a little rougher than with SVN. Some of the docs are good, but lots are geared assume a rather thorough understanding of the internals. Once you get the hang of it, it has great flexibility, but I've seen almost everyone who has started with it really stumble when beginning. Even after working with it for months, people debate the best patterns to use. It's really sweet for 1-person projects (where you want to track history), and for distributed projects like GitHub. I use Git even for small co-located teams, because I enjoy the speed and flexibility.
Given what you say about your team, though, I'd probably recommend trying SVN. There will be better resources to help you get going, and you'll be less likely to get frustrated with it.
Hope this helps.

Growing development team- issues with Dreamweaver Check In/Out

Our relatively small development team is getting a bit sick of Dreamweaver. The only functionality that we're reliant on is its file check in system. As the team is likely to grow over the next few months we need to address these issues.
Subversion has come to our attention but are unsure if it will suit our requirements.
All we need is to be made aware of whether or not someone is working on a particular file before we request it from the server and to block any overriding of a checked out file.
Any recommendations or advice on general best development practices would be much appreciated.
Thanks in advance.
The way this is generally done with SVN is to not "block" people the way you ask for : on the contrary, SVN allows for several developpers to work on the same file, and the modifications each one made are then "merged".
This merge is mostly automatic ; but when it is "too complex" (like when two developpers modified the same portion of a file), one human being has to resolve the "conflicts", indicating which modifications from which developper has to be kept.
This way of working by merges, instead of locks, seems a bit unusual at first, but once you get it (you'll need to take some time to explain your team about it, and how to use it efficiently, of course), it works really nice : I've used SVN on projects with more than 10 developpers, with absolutly no problem (a few conflicts once in a while, but you solve them and that's it).
On the other side, locking files so only one developper can work on it can block the whole team : what if one file is locked by a guy, and he goes for a coffee-break ? And at this same moment, someone else need to modify the same file to be able to work ?
For more informations about SVN, you can take a look at this online book. It give lots of useful informations :-) (you will probably not need all of that, but a quick look can do no harm ^^ )
As a sidenote, if you are developping in PHP, on a big application, an IDE like Eclipse PDT can help a lot ; and there are plugins, like Subversive, that can be used to integrate SVN access into Eclispe.
There are a number of version control solutions you can look into. Are you sure you want to restrict people from working on similar files? Users can fork the development branch and have their own, when they check in any conflicts will need to be merged together. Some of the version controls come with tools to handle most of the conflicts for you.
It's not always a good idea to lock files that another developer may need to make modifications for. One problem you can run into is if the person with the file checkout is out of the office and their machine is inaccessible.
If that is functionality that you MUST have most of the version controls will allow you to configure your branch to work in such a way.
A few of the version controls out there are: CVS, SVN, Git, SourceSafe, ClearCase
If you decide to use SVN with dreamweaver, there's an extension to integrate some of the commands into the ide: Subweaver
Subversion is ok for our team. We're trying to decide if we should lock files or use the default copy-modify-merge model. Could you give me some examples of when you would have multiple developers on the same file. It sounds a little bizzare as I can't see why it can't be a one man job.

Source Code Control Systems in Web Development

We are just beginning the process of looking for a source code control system. I realize we are behind, but better late than never. None of the members on our team have experience with any systems in their past so I was hoping I could find out some basic things to look for as we begin investigating different tools. Here is a little background on our team:
Our group consists of developers and designers
We work primarily on PC's with one or two on Mac's
Many are not comfortable with command line based systems
The majority of our development is for the web
We develop in ASP.NET, ColdFusion, and PHP
A few we plan on looking into:
SourceGear Vault
Concurrent Versions System
Subversion
Microsoft Visual SourceSafe
PVCS
Rational ClearCase
Team Foundation Server
Git
Tourtoise SVN
Bazaar
Any experiences with any of these would be helpful to hear about.
Do not use Source Safe! It's not only bad for source control it's just bad for the world.
I use Subversion with Tortoise. I love it. Rather easy to get up and running. Branching/Merging can still be a nightmare though.
Visual SVN is good too.
If you havent had a single sourcecontrolsystem so far, I rather doubt you can see the improvements of GIT etc.
Start simple and with a lot of support: use Subversion as Server and Tortoise as Client.
Its a easy setup and easy to use.
Subversion is especially suitable for web development because of the 'differencing' algorithm it uses for binary files. Web development isn't just about code. Binary resources come into play a lot (images, PDFs, etc).
Subversion tracks the differences between files and records those. Contrast that with CVS, which essentially stores another copy of the binary file, and the benefit becomes apparent as your binary resources and check-ins increase.
I use the TortoiseSVN plug-in, which is decent enough for me. As you specifically tag asp .net, you might want to look into VisualSVN, which does a great job in mitigating the biggest problem in version control - a colleague forgetting to add a file to the repository.
I also used Visual Sourcesafe back in the day. Don't know if it's still the same now, but its exclusive checkout per user was a complete nightmare in a team of multiple devs. Constantly had to remind people to check stuff back in or, alternatively, convince a friendly admin to log me in under their credentials whenever someone was out of office.
You may want to take a look at Perforce.
http://www.perforce.com/perforce/products.html
You should go with subversion, or maybe git or mercurial.
It's clearly not worth it for you to buy anything, I think you can remove commercial solutions from your list right away.
Also, you should probably get some 3rd party hosting instead of running your own server.
I work at a client where they use TortoiseSVN as the client and installed VisualSVN (Subversion) as the server component. At one point we had this master plan to use nANT and CruiseControl to keep 3 different environments for a .NET website in sync, but we haven't gotten approval on that yet (shock). So until then, we use our Subversion server to hold all the source code and keep the different environments in sync manually. Its not the best scenario in the world but it gives everyone access to the code and our development group is small enough that its easy enough for everyone to know what is being worked on.
Subversion as a server, and tortoise svn as a client, could fit very well for your requirements, althought I hear that GIT is newer and has a lot of improvement.
I'd second using Tortoise SVN, avoiding SourceSafe and add another to the list:
Perforce - This what was used at one of my former workplaces. It wasn't bad though the merges were painful to do in that it took 1-2 developers a day to get the code merged to move from one environment to other,e.g. dev->test, test->staging.
Tortoise SVN has a lot of built-in windows explorer options that can be used instead of the command line so I rarely use the command line with Subversion.
If you do go with SourceSafe do beware that there is an admin tool to analyze the DB to see that should be run periodically and can be a little annoying as I don't think anyone is supposed to be using SS when the analyser is running. The branching in VSS is kind of weak, especially in contrast to seeing how well things work in SVN.
Another point is to consider if you have a bug-tracking system and want to have an integration between the two.
i personally use git with cygwin. i prefer it over svn because of the pain that svn has caused me in the past with merges. git was designed with making merges painless and it does a very effective job at adhering to that.
if cygwin isn't your cup of tea and you need to have windows explorer integration, please check out the ToroiseGit project. It has the look and feel of ToroiseSVN so it's easy to pickup. you can even run ToroitseGit and TortoiseSVN side by side if you desire.
also TortoiseGit has built in support for SVN repos so you can check out an svn repo and get all the benefits of local branches and what have you.
It true that VSS should not be considered - it is a dead product and just plain bad. However, Team Foundation Server - especially 2010 should be given a look. It not only does source code control but it has a work item tracking system, CI and build server and has some really great tools for testing. For example, it will run automated scripts and record the session in an mpeg movie so that you can actually see what the screen looked like when/if the test failed.
If that's more than what you want, go with SVN.
First advice: Don't use SourceSafe. It's a nightmare. I think even Microsoft developers don't use it internally!
You could go with SVN using TortoiseSVN as a front-end for the people not comfortable with the command line. But you will have to host your own Subversion server or to find an hosting provider for your repositories.
Also, there is SVN plugins for the most used IDE out there.
Another +1 to Subversion. Have used with a variety of languages, including ColdFusion. Tortoise is great for windows, the best graphical clients for Mac are not free, however.
Would also recommend against Rational Clearcase. Their client is kludgy and there aren't near as many plugins for different ide/platforms.
I'm currently working with Rational ClearCase and I cannot complain (at least, 'till now).
Before that we used ChangeMan Dimensions, that's a regular CVS tool with many resources but in my opinion, it makes source control become very burocratic, to say the least: it features the infamous exclusive checkout. I also don't like the design.
ClearCase has a Windows-Explorer look and once you get used to it, it becomes very simple to use. It also has a nice and easy integration with MS Visual Studio.
SourceGear Vault is a great tool. Its interface is similar to VSS, but it doesn't have all the problems.
If you use .net and visual studio or are in a heavily MS environment you may really like TFS. It has very good integration with Visual Studio. It also has lots of other functions like tracking tasks, bugs, etc. and automating builds. It is expensive, especially in the world of SCMs where you can get a lot for free (svn, git). Since you mentioned .net though it may be worth a look.
You need to make a decision as to whether you want to pay for it or have one for free. I know SVN and CVS are free and there are great UI clients and IDE plugins also available for free.
We started off with CVS and then transitioned to SVN a few years ago. The advantages we had were that a. SVN repo was smaller, b. It was accessible over the net through both http and https, c. Had great client UI tools (i use SmartSVN), there are also great plugins for eclipse and intelliJ. d. transitioning from using CVS to SVN was very easy as a user.
I've used QVCS by link text they have fair and much cheaper prices, for different versions.
I've used and tried subversion, and I personally do not like it, but if people like it and use, that's awesome for them.
I say you should find one that has the features you need, and price range that is reasonable, and has a good support system..
The hard part is getting everyone on your team to use it, and use it wisely...
Personally, I really like Subversion and the tortoiseSvn client as many have already noted. One site I found that I really like is http://www.springloops.com. They offer cheap SVN hosting, but they also integrate with BaseCamp which I love for managing projects. If you like Basecamp and also use Svn, its worth a look
Git with GitHub for Windows and/or TortoiseGit.

Site Development - Your Setup ( editor,project management, test site, live site.. etc) [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am relatively new to the Web Development business. Me and 2 friends started up our own little company. 1 person is a designer, 1 person is sales / consultant, and I am the developer. Right now, its an after work project, but we hope to expand and let it become our full time jobs.
Anyway, my question to you, is what is the best way to go about a full web development project cycle.
List of things to discuss:
Proposals - do you guys find these important
Project Planning - how much planning and mapping out should there be?
Project Management Software - I did a
little research before and I like the
online portals. Parallels stood out
for me.
Editor tools - I have been using the
most basic editor Notepad++. I feel
like I should be using something more
advanced.
PHP Framework - I just got hooked on
CodeIgniter.
Ways to deploy site - right now I am
doing most of my editing via FTP to
the live site. Should I be working
on a local copy and then uploading to
a test site for the client? Then
eventually go to the live server.
Are there ways to automate this?
(best practice ?)
I cant wait to hear all your input, especially from folks who are veterans at it!
Proposals
This really depends on what sort of clientele you are looking at. It probably will not be necessary at the beginning of your company since you will be dealing with small to medium clients, but its not bad to get into the habit. When I did a bit of freelance web development, I did not work on a proposal-based system. Instead, I did more of a site mockup->changes->implementation system. I suppose a mockup is a form of a proposal...
Project Planning
Again, this depends on the size of the project. If you're working on a static 20-odd page website, you probably do not want to get too much into the planning aspect. However, if you are working with a site that pulls into a large number of technologies (forums, CMS, AJAX, web-services, etc.) you probably want to invest a little more beforehand.
Project Management Software
Cannot say I have ever used a project management tool during my days as a freelance web developer. I'd say don't invest in anything right now. Once your company grows, you'll have a better idea of what your requirements are.
Editor tools
Notepad++ may cut it now, but I wouldn't recommend it in the long-run. If you are looking at technologies other than PHP, I'd definitely not recommend it. In fact, if you are looking at a clientele that's more "business-user" esque you need to think about getting into ASP.NET or J2EE. I would suggest getting a PHP IDE that at least has code completion, as this can help eradicate a ton of PHP bugs. I'm not sure if Notepad++ has this. You also probably want to get a debugger that integrates into your IDE. I know Eclipse had a PHP IDE a few years back, but I'm not sure how good that is these days.
PHP Framework
Never really used any PHP frameworks but that's because I graduated and got a job before I had time to teach myself any of them. :) Go with whatever fits. You probably want to get used to more than one since some projects will fit better with some frameworks.
Ways to deploy site
Defintely, definitely get a local server set-up. You can get a WAMP/LAMP installation set up really easily on your dev machine. As others have said, you probably want to use source control because of Murphy's Law. Personally, I've been using wampServer the last few years as I haven't really been developing that much PHP and that allows me to get a working environment up really quickly. But you may wish to customize your devenv further. But you should definitely test your applications on a dummy server with a dummy database before deploying it to a live server with a real database!
Hope this helps!
Impossible to answer this fully in a single post here, but I'll give you some punchlines:
Proposals - do you guys find these important
Not sure what you mean by that? Sales proposals?
Project Planning - how much planning and mapping out should there be?
Don't spend too much time planning up front - it'll lose its value once you get further down the line. Do plan enough though. Usecases and some interface sketches/wireframes are good value.
Project Management Software - I did a little research before and I like the online portals. Parallels stood out for me.
You'll never find a golden bullet here. Use as little/simple as possible and always go for something with a clear exit route. Less is more. Also, keep in mind that this kind of tool needs to work for very different types of people, at the same time. The tool supports a process though, so keep that in mind - don't let the process be defined by the tool.
Editor tools - I have been using the most basic editor Notepad++. I feel like I should be using something more advanced.
Use what works for you. A good tool is nothing, unless you know how to use it. Likewise, if you know a simple tool well, you can get very far.
PHP Framework - I just got hooked on CodeIgniter.
The exact same applies as with editors.
Ways to deploy site - right now I am doing most of my editing via FTP to the live site. Should I be working on a local copy and then uploading to a test site for the client? Then eventually go to the live server. Are there ways to automate this? (best practice ?)
This should be high priority to change. At the very least, get your source code in a SCM - Subversion is the most mainstream, so I would suggest to use that. Second, get a separate development environment and production site. You develop at your dev setup, and when it's done, you deploy to the live site.
Next step is to look in to testing and automated deployment (google for that). But first things first - Get used to SCM and a separate dev/prod setup.
Finally, if you haven't read it already, Getting Real might be worth your time.
Proposals - Why not. Just don't overdo it. Don't let it become like this big corporate wall between you and your clients. You're small, be personal. That's your strength.
Project Planning - There's three of you? Skip project planning software.
Editor tools - If there's a specific function that Notepad++ doesn't have that you need, then switch editor. But don't switch just to feel more advanced.
PHP Framework - Keep an open mind and use what ever you get hooked on.
Ways to deploy site - Always work against a dev box. Some have test boxes with real-world data to test updates before deploying to the production box. Always version control your code. Whatever tool or method you use to deploy (really a matter of taste) keep a simple checklist with steps to go trough when deploying, and keep it up to date. Do automatic regular backups of your production box and actually do a reset and restore on a test box every now and then, and write down the steps needed to restore from backup.
As an editor, I strongly recommend jEdit. It's cross-platform, speaks many programming languages, has lots of plugins for extended functionality, macro record/save/playback, is actively maintained, and is very configurable.
For deployment, Subversion makes a lot of problems go away. For web development, I typically have two branches; devel and live. All changes are done in devel. When you're ready to publish the changes, a single svn merge operation applies the same changes to the live branch.
Subversion has hooks in its infrastructure to call scripts when certain events happen, like checking in software. A post-commit hook can automatically transfer (scp, ftp, unison, etc) the files onto either the devel server or the live server, depending on which branch the changes were. Now you have nearly immediate and automatic website updates whenever changes are checked it.
Another nice thing about Subversion is that it can hook into Apache to provide a WebDAV interface, so you can change files from anywhere without opening up Subversion itself through your firewall. If you need to make a quickie change from your day job, you can.

Subversion... practical with a PHP framework app or not?

I am developing a website using CodeIgniter and PHP. Some of my friends suggest I start using Subversion to take care of my organization. Could someone give me a basic explanation of what SVN is without the jargon and also if it is practical for a framework where 5 files are needed to run a single page?
Subversion allows you to store your source in a central location, make changes from multiple places (ie. laptop, desktop), track changes and revert changes to your source tree if needed.
Have you ever made a big 'improvement' and then decided you were going in the wrong direction? With Subversion you can revert to the version of your source before you started heading off in the wrong direction.
Or how about this, you make some subtle changes to the codebase, but don't notice that you introduced a new bug until much later. You can use subversion to revert to previous code versions, helping you track down the change that introduced the bug.
It is more valuable when sharing the source with multiple developers, but even for my single developer projects I find it very handy to have all my source and changes in a Subversion repository.
If you combine it with Trac, you can then keep track of bugs/features, milestones, and use the Trac Wiki to document your project.
Every single project (even with only one developer) should be under source control, no matter what framework or language you are using.
Using simple words, Subversion will keep a history of your code files, should you like to revert them to a previous state or restore a copy in case of a disk crash (SVN must be on another computer in this case). It will also help you see easily the differences between two versions of a file.
For more information, just read TortoiseSVN user's guide, it has a pretty good overview of Subversion.
Here's some good info : Chapter 2. Basic Concepts
SVN is a version control system. It is used as a central repository for all of your code.
A significant strength of SVN is that it uses a Copy-Modify-Merge work flow model versus a Lock-Modify-Unlock model. The idea behind this is that each developer checks out or copies (copy) their own version of the code, works on it (modify), checks it back in and reconciles any changes (merge) that may conflict with other work another developer has done.
This is really handy as if you wanted to work on a piece of your code, you won't have to worry about the file being locked because someone else is working on it.
If anything, developers should use SVN to catalogue all revisions of their code and revert back if needed.
SVN is a version control system - which means that it stores various previous versions of a given file, and allows many people to work on the same file, and in the end put all the changes together. It also helps you go back to a previous version if necessary.
You should use that in your project if there are a lot of people working on the project. But even if you are the only one working, it will be easier to manage the project if it is on version control.
It's a way to keep control of versions. You could think of it as some kind of incremental backup. You send your code to the SVN server and it saves only the differences from the last version. This way, you can go back to an earlier version if you need it. It also allows you to work with more people and merge differences with ease. I say, you should use it. It's easy and useful.
Irrespective of what software you produce and even if you are on your own, SVN has to be used. I depend on it every day. Its the one software tool I could not live without. If you can install it off-site it gives you backup as well.
Simple things like being able to do a diff on the previous version of a file when you are making changes, can be a great help.
Use Toortoise under windows for the client side. It integrates into Windows and is just great to use.

Categories