Version control for PHP Development [closed] - php

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.

Related

Properly work in a duo using GIT

Me and a friend of mine are starting a project with CodeIgniter. We have never worked in teams before and therefore are very new to this whole VCS thing. I've read a lot of good things about Git since it's decentralized.
Since it's just the two of us, the checkin-checkout process is not a HUGE deal but we would like to keep it professional for further growth. The problem is that we are both very lost on how to use git. Git's documentation is just too much to handle at this point.
So how would we set this up? I assume we develop on our local machines and run it on a local LAMP/WAMP server. If the result is good we push it to the central server right?
Also how do I get the edited files from my partner? Do I have to manually download those or does git do that (or is there another/better way)? (This part is very important since we are developing really quickly now and a lot of things are changing.)
I am working on NetBeans and I can persuade him to do so as well if necessary.
Git is really easy to learn, I recommend these tutorials from BitBucket (I learnt from there myself), it will take no more than an hour.
https://confluence.atlassian.com/display/BITBUCKET/
Git works by commiting files to a repository, and you can pull files from that if there's a change. The tutorials will explain it all and how to set it up :-).
Git is powerful and how much you get back is proportional to how much you spend time learning it. :-) It does take some effort to learn about git. Remember it is neither perforce nor SVN.
One of the best tutorials for quick start I will recommend http://www.vogella.com/articles/Git/article.html
For eclipse you can use EGit plugin. I am sure there is similar one for NetBeans.
About your question on central server, perhaps you can start with http://bitbucket.org which allows you to host free private repository (as long as there are no more than 5 folks using the same repository, then you will have to pay)

Need cheap source control [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
My friend and I accepted simple PHP job, he has some experience working with a small team of developers and I'm new to this (and PHP to be honest :).
When I asked him about his environment I found out they (he and his previous team) never used source control, just a shared FTP server with a lot of mess. Now beginning this project I want to do it properly and use source control, I did some research and it looks like SVN is the simplest to use and fits our simple requirements.
My problem is that I don't really have an extra box to create a server... I have two options, one is to use my main windows machine as a server (it's always on so that's not a problem) BUT I can't always guarantee that it will be on when I'm far from home and I don't like how it will waste CPU cycles (It's also my gaming rig), the other option is to use an old laptop I have lying around (a Pentium 3 with about 128-256MB of RAM) and install the slimmest version of linux on it and the SVN server. it has the advantage of being simple, cheap and easy to maintain, but it has the disadvantage of being alow performing old laptop and having some uncertainty about it's reliability (I guess I'll set up some backup to my main machine).
Which option is better? I would prefer using the laptop but I'm unsure if its specs will slow us down, if I do use it, what version of linux would you recommend, and how simple is it to add some regular backup to it (I have almost no linux experience but I'm glad to learn).
PS. forgot to mention, both of us developing on windows machines.
EDIT: Most of you recommend Git and Mercurial, I think I'll go with mercurial because I read that git is more complicated, I really want the simplest solution that I can find. Unless git has some major advantage over mercurial? or maybe mercurial is the better one for the job?
Look at distributed version control systems like git and Mercurial (hg). Both have free/cheap hosting services (e.g., http://www.github.com and http://www.bitbucket.org) and are well suited for multiple developers working independently.
Also both have good tooling on Windows.
Why not use bitbucket/mercurial (hg)? You can set up (apparently) free private depots. Mercurial is crazy easy to use and is a lot newer (and rapidly gaining popularity) than svn.
Use git. It was designed and written by the guy who started Linux and he knows what he's doing.
You don't need a server for git, each user has a copy of the whole repository and you sync to each other. There is a bit of a learning curve, but if you're smart it will make you better developers.
DVCS like git is cool because you do not even need server. You basically just "synchronise" your code between each other here and there and due to fact that each repository has data from all repositories once is "synchronised" you do not need extra backup or server in most cases.
I found nice feature whit git (probably whit other VCS-s too) is that since they are just file based you can use any (free) cloud storage / ftp / git_server to backup your files in case of cataclysmic catastrophe.
I would highly recommend Mercurial (hg) as mentioned above, simple, easy to use and distributed. Personally, I prefer it slightly to Git and secondly its Windows support is better.
Bitbucket also lets you have free private repositories whereas Github is only free for public repos. Which I am guessing will be a factor if you are producing commercial code.
Why not go another route and get GitHub.com (pretty cheap, but costs a little) or BitBucket.com (this one is free for up to 5 users and unlimited repositories). You'll avoid a lot of headaches from maintaining your own servers.
If you want to host it yourself, check out subversion edge. Its a packaged svn that comes with apache and some management tools.
If you dont want to deal with admin stuff, check out beanstalk. They do hosted SVN.
Or, you could use something like git and github; but if you're really set on svn, check out beanstalk

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.

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

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.

Categories