views:

806

answers:

17

I am a student and I always develop projects on my own, mainly with Ruby On Rails.

I noticed that even a simple project may become complex if you can't easily rescue deleted code and pass from a version to another. Time Machine backups are not enough.

I wouold like to use a version control system, but they seem not to be intended for single-user projects. Am I wrong? If so, what policy and software do you use for managing your code?

+3  A: 

Subversion!

You can install locally or use a hosted service. The services are nice if you want to switch between computers or use it as an offline backup. http://www.beanstalkapp.com/ has a free plan for personal use.

GitHub (git, not subversion) is also popular but I believe there is a small fee for personal projects.

Ken
it's pretty much only if you want a private/commercial repository on Github that you'll pay for one. Open source isn't being charged for.
Alister Bulman
A: 

Version control is always important. Try a free online SVN like http://beanstalkapp.com/ Do a search and you can find lots of suggestions

prestomation
A: 

I would highly recommend downloading VisualSVN Server. It's a very simple setup and will do exactly what you need.

I am on a Mac ;)
collimarco
+15  A: 

There is nothing that says you can't use a standard version control system if you are a single user. Doing so would definitely keep you from experiencing some of the more painful problems such as merging files changed at the same time and other conflicts that arise from multiple developers.

Based on this, you could look into any of the version control systems (I believe Subversion is far and away the most popular right now) and pick out the one that will most closely match your needs, or has the interfaces you are most comfortable with.

TheTXI
+1 - Pretty much all my non-binary files are under version control. Maybe a FUSE driver for SVN-as-mounted-volume would be good.
Aiden Bell
+6  A: 

Distributed version control systems are just for you: look for Bazaar, Git or Mercurial. They are lightweight, local commits are easy, and later, you can easily share the projects with other potential developers.

thSoft
+3  A: 

Use git. It allows you to work without ever needing a server.

There are utilities for the command line and a GUI (older screenshots) too (for linux, windows and OS X).

If you later want to share or publish your project you can easily push it to a site like github.

David Schmitt
+1  A: 

I use subversion to manage all my projects. xp-dev.com is a free subversion hosting solution. Also, I think, if you install tortisesvn it installs a subversion server to use locally.

swagers
+6  A: 

I would recommend Subversion. It's free and relatively simple, and learning a little about it may well beneficial in the future. It's cross platform and also available on a variety of hosted systems.

See also: http://stackoverflow.com/questions/250984/do-i-really-need-version-control

and: http://stackoverflow.com/questions/360887/using-version-control-for-home-development

Colin Pickard
I use SVN for personal projects because 1) it's free, and 2) you can have local repositories via the file:// protocol (so you don't need to have or run a server).
Michael Carman
A: 

you can use any version control system that exists just for single user development. as you said, even simple project can become a nightmare if you change something you think is better and it fails. download tortoise snv - it's free and pretty simple to use - and keep your working versions in repository. commit code that works, keep possible small changes (for example refactor one class), build it, test it if it works -> commit, if it doesn't and you don't know why you can allways revert changes and try again.

grapkulec
+1  A: 

A complete different version control system is dropbox (www.getdrobox.com). It's not (only) intended for source code. It available (with smart OS integration) for Mac, Win and Linux plus private Web Interface.

It may be interesting for you.

tuergeist
+2  A: 

Even for personal projects, if they become bigger than something you write a few hours, a version control system will be very beneficial.

Here are a few good points:

  • Many version control systems have good integration with IDEs.
  • Branching will allow you to experiment without the fear of having to take a long time to revert the changes. The branch can later be merged to the main trunk if needed.
  • Having a history of changes can be helpful, and tagging will allow setting milestones.
  • More efficient storage than full backups using regular copying of files.
  • Extra metadata (such as commit comments) can be attached.
  • Many version control systems are free!

I personally use a Subversion server running on my system which I access via the Subclipse plug-in in Eclipse, which I find to be very helpful in keeping track of my personal projects.

If you're interested in Subversion, Version Control with Subversion is a very helpful source in learning about the concepts, and how to set up and get started with Subversion.

Version control systems may be a little difficult at first, but it's definitely worth the effort to set up!

coobird
A: 

I'm very wary of using "always" in any answer I give on SO...

ALWAYS use version control. These days it's free AND easy to do. There's simply no reason ever not to use it. If it's an hour long project...good...it's an hour long project that's in version control now.

My solution has been slicehost(ok...not free), redmine(free RoR bug tracker)git and gitosis. Starting up a new project adds about five minutes on to the front of any coding, but its five minutes well worth it.

Jason Punyon
+2  A: 

Use SVN or Mercurial.

Both very appropriate for "home" usage, I think Mercurial is better for you because by default you'll be creating one repository per project ( oposed to SVN's one "big" repository that stores everything ), so it will be easier to backup individual projects or exchange sources with others if needed.

Both work in command line mode or using explorer-like interfaces ( Tortoise ) or plugins available for the most usual IDE.

Billy
Absolutely recommend Mercurial over SVN. SVN is great but it has one big repository. Mercurial is per-project and quick and nimble. I can go into a directory, type "hg init", "hg add {files I want to add}", "hg commit" and I've setup my repository.
Jason S
If you've laid out your repository right, there's no need for subversions "one big repo" to be a downside. Nevermind that if you share your subversion repos via Apache, you've effectively got unlimited repositories at your disposal (to wit: sourceforge)
Chris Kaminski
@darthcoder: when you install SVN for the first time and never used it before, I doubt you'll get the layout right ... On the other hand, as Jason says, with Mercurial, you just take any folder and convert it in a sec to be a repository. You can't go wrong with that.
Billy
+1  A: 

One item you will like about git such as using github hosting is that you have a history of changes that you can go to and get the actual code source and thus 'rescue' previous code changes.

You could also use the dropbox approach in just backing up raw code to a folder on the cloud..

I have used both methods for personal projects.

Fred Grott
A: 

Your Mac installation CD comes with CVS Version Control as part of the XCode Tool kit

See http://developer.apple.com/internet/opensource/cvsoverview.html for more information

Katy
Don't use CVS. Really. Though the barrier to entry is low, there are so many better options available out there today. Git, Subversion, Mercurial, Bazaar. CVS should be your last resort. IMHO.
Chris Kaminski
True, but at least he's got the stuff readily available if needed!
Katy
A: 

Hosted version control such as beanstalkapp.com is very convenient, but do consider whether you want to hand your source to a third party. You could consider a local repository, backed up online with a solution which encrypts the contents locally before uploading. I do this with subversion, Amazon S3 and JungleDisk.

Neil Gall
+7  A: 

It is definitely a good idea to use version control software, and other project software on your own projects. These tools are not just for team working, although they allow team working. Beyond the obvious reasons for keeping track of your changes to the project it is a good idea to use SCM tools so you are familar with what the industry is using.

Subversion is widespread, and is quite a good bet as it's successfully replaced the earlier and older CVS tool. It relies on a central repository where the code is stored and can be backed up: where I have used SVN for personal projects and small team projects I have backed up to CD. If your project is opensource there are sites like sourceforge that support svn which you can use for hosting.

However as some of the other posters have indicated, a personal project might benefit more from a distributed system: git is increasing in popularity since git-hub has come online and porting efforts to are succeeding. http://git-scm.com/ It is likely that tools like these will grow in popularity over the coming years as they allow a greater number of people to participate on the same code. The idea of one central repository is relaxed giving each developer the ability to version track different designs and only give back to the community the versions they complete.

One of the benefits with using SCM for all projects personal or not, is that a separate server can be set up testing a version of the code. Automated testing on the latest version of the code (using a Continuous Integration Server or similar) can improve the quality of the software you are writing.

Some highly experienced software developers talk about a rhythm where they make incremental changes checking in frequently. Getting into the habit of making small changes which are complete and checking them in: is a good practice to get into for group working.

andygavin