Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Very often I'm working on small projects only for myself. I'm working on one machine, but recently I thought about using some kind of version control nevertheless. This would have some benefits as for example:

  • I don't have to care anymore for local backup
  • Mistakes can easily made undone
  • History can be maintained

But on the other hand it has also some drawbacks like for example:

  • Additional resources required
  • Time to setup, get used to it, etc.

From your experience, is it a good thing to use revision control when your working alone?

share|improve this question
    
My two cents: I use Mercurial and NetBeans and the most valuable part of the VCS I use (Mercurial) is being able to make changes, look over the changes and clear them off (commit) (files at a time or the whole project) at my leisure. (NetBeans has a graphical diff that works with Mercurial) It helps me keep a handle on what I just did. Our company has a different history and backup system so I typically do not use it for that purpose. –  George Bailey Feb 25 '11 at 1:24
add comment

7 Answers 7

up vote 35 down vote accepted

Yes.

All it takes is a single mistake and you'll be kicking yourself for it. You're also in the position to choose which version control system (VCS) is used. If there is any possibility that you'll work in a development team in the future, this is a great time to give yourself hands-on experience with a VCS. SVN and Git (or Mercurial) would be great starting points and should only take a couple of hours to grasp the basic commands in each VCS.

Now to debunk what the negative points...

1) Additional resources required

The only resource required is disk space. Since this is a small percentage (smaller in Git than X) of your total code, I don't think this will be an issue. It doesn't cost any money either.

2) Time to setup, get used to it, etc.

There will be time required to learn it, but it is only a few hours for each of these (as mentioned above). On the longer term, it has the potential to save you an infinite amount of time (and so much more). Once you've mastered the basics of a VCS, it will be far less finicky than performing the local backup you have in mind.

share|improve this answer
5  
+1: Very good points. However, I would not recommend svn: it does not allow one to commit changes when not connected to the internet, which can be a strong constraint, at times. I would recommend Git (for power users) or Mercurial (for a simpler system). –  EOL Feb 24 '11 at 21:33
7  
Another vote for Mercurial. –  Chris Holmes Feb 24 '11 at 21:36
3  
@EOL, SubVersion is viable in this case. If the repository is local then an internet connection isn't required to make commits. (Although I would suggest the repository needs to be at least on a seperate drive from the development drive.) –  Ken Henderson Feb 24 '11 at 21:51
1  
@EOL: Ah yes, I forgot to include Mercurial because I haven't used it before; will edit now. While (after using Git) I wouldn't touch SVN if I had to, SVN is still widely used. –  Jonathan Khoo Feb 24 '11 at 21:53
1  
+1 for "save an infinite amount of time (and so much more)". If this is referring to time, it's brilliant. If it's referring to things other than time that VCS saves you, it's even more brilliant. –  corsiKa Mar 14 '11 at 18:35
show 3 more comments

Yes. Use it for everything. Use it for every document you write in Word. Use it for all code you write. Use it for every image you create.

Also, once you learn how to use it, you'll be better off when you work in a team environment.

share|improve this answer
3  
The only problem with Word is that it's in binary format, so you can't do a diff; another reason to use LaTeX. –  gablin Feb 24 '11 at 23:22
    
What would be the point of using it with images? –  Rook Feb 25 '11 at 1:13
    
e.g. WinMerge can diff Word and Excel documents –  Simon yesterday
    
@Rook: the point of using it with images is that if you edit an image, you can always go back to the old version if you need to. –  Alex D 23 hours ago
add comment

I love using Git when working alone. For example, when working in PHP, I just make a Git repository on my local directory that Apache is serving. I can easily start working on a new feature (in a branch) and test it on my local machine. Then, if something comes up and I need to make an "emergency fix", it's a simple as:

git checkout master

Voila! My working directory is back to the state it was before my branch. I can make the quick fix. When I'm done, I can switch back to the branch and keep developing.

The learning curve isn't very steep, and there is plenty of info online to help you get started. Dig into it. It's worth it.

share|improve this answer
    
Git along with GitHub or Gist are worth the effort for solo projects. They protect you from yourself and make it really easy to get help when you're ready for others to get involved. –  Rob Allen Feb 24 '11 at 21:16
add comment

The changelog gives you a good place to document your changes, without cluttering the source.

share|improve this answer
add comment

Go for something hosted like SourceRepo. Isn't too expensive, but using source control makes undoing mistakes and reverting code so much easier.

And you can access it anywhere if you need to.

share|improve this answer
4  
you might want to be careful about uploading company property to external servers. it may be okay with some companies, but others would frown on it. –  davidhaskins Feb 24 '11 at 21:03
1  
Good point to watch out for. Submitter said projects for himself, so I assumed it was for personal use, but definitely ensure line managers are aware of the system you decide to go with (especially if they are Cloud-phobic). –  James Love Feb 24 '11 at 21:04
add comment

I always used git for my development, until I realized I could use it for other things as well. So try git, it gives you a real repository, without the need of a server and a constant connection (that's a big plus for me); it does not spread the subdirectories of your project with hidden files and folders, instead there is only one folder at the top of the project; you can throw it everything and clone anything you want and merge them again, that it just works.

share|improve this answer
add comment

I always set up source control for my own projects, with a continuous integration environment as well to build/run unit test/run integration checks every time I check in. Plus if it is a web app, or windows service I have it deploy targets as well. I have saved myself countless hours debugging and deploying using this method and is nothing compared with initially setting it up.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.