30

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?

1
  • 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. Commented Feb 25, 2011 at 1:24

9 Answers 9

46

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.

7
  • 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). Commented Feb 24, 2011 at 21:33
  • 4
    @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.) Commented Feb 24, 2011 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.
    – J.K.
    Commented Feb 24, 2011 at 21:53
  • 1
    @ken svn with a local repo in dropbox is ideal for a single user Commented Feb 25, 2011 at 5:18
  • 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
    Commented Mar 14, 2011 at 18:35
13

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.

4
  • 4
    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
    Commented Feb 24, 2011 at 23:22
  • What would be the point of using it with images?
    – Rook
    Commented Feb 25, 2011 at 1:13
  • e.g. WinMerge can diff Word and Excel documents
    – Simon
    Commented Jul 23, 2014 at 6:08
  • 2
    @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
    Commented Jul 23, 2014 at 7:44
10

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.

1
  • 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
    Commented Feb 24, 2011 at 21:16
5

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

2

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.

2
  • 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. Commented Feb 24, 2011 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
    Commented Feb 24, 2011 at 21:04
2

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.

2

If you're looking for free and support for closed source, I'd take a good look at Visual Studio Online. It's free for up to 5 devs, and being by yourself... well... yeah. This is a post 4 years later so you're situation has likely changed, but for other individual devs looking for easy source control VSO is one of my favorite choices if I don't want to expose my source code. IIRC Github is free for only open source stuff, but their pricing is very inexpensive. Both VSO and Github integrate very well with Visual Studio, if that happens to be your IDE of choice.

1
  • And VSO supports Git now! Goodbye clunky old TFVC!
    – RubberDuck
    Commented May 8, 2016 at 12:20
1

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.

1

Another feature that's really cool about repos is that you can do really risky experiments / features in another branch. If it works out then you can merge as part of your main code. If it doesn't or you run out of time, then you can abandon it (saved) and switch back to your main code with the option to return to it later without it messing up your main code base.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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