Version Control – Best Practices for Independent Developers

solo-developmentversion control

Do you think it's worth it to use version control if you are an independent developer, and if so, why? Do you keep the repository on your own computer, or elsewhere, where it can serve as a backup?

Best Answer

If you use decentralized source control (Mercurial or Git or Bazaar or whatever), you get advantages over SVN/CVS that makes it easy, useful and powerful to use in case you're an indy:

  1. You commit locally: your project dir is your repo with FULL history. So you don't have to have a server, you commit directly in your repo, and you can have several repos in the same computer. Using a laptop that you open sometimes to continue working on your things? Great! You don't have to setup a server and if you need one later, it's easy and you just "push" and "pull" changes between repositories.
  2. It's made to ease experimentation: often you need to have an idea about a feature without polluting code. With SVN and CVS you can already use a branching system and ditch the branch if the feature is not as good as you wanted it to be. But if you want to merge the feature with the trunk version, you'll have a lot of hard to fix surprises. Git, Mercurial and Bazaar (at least) makes merges and branches really easy. You can even just duplicate a repo, work on it some time, still commit and kill it or push your changes in the main repo if you want.
  3. Flexibility of organisation: as pointed before, as you have repos that you organize as you need, it's easy to start alone and allow other people to work with you by changing your organization. No organization is imposed so you just have to set it up and voilĂ . I often just push/pull changes between my own computers (laptop/desktop/server) and I'm still alone on my devs. I use Mercurial and that help me duplicate my work but also work on features I thought about outside on my laptop, then continue to work on other features on my desktop, then push my laptop changes on my desktop or server and merge the whole desktop+laptop and put it (as backup and future teamwork repo) on my server.
  4. It helps setting up backups: if you setup a central repo (on GitHub if it's public, or in a private repo on BitBucket) you can easily write a script which will be executed each time a computer is booted, and then pass said script on to your friends so that it makes automatic backups of your work regularly. It's what I'm doing so now I'm sure it won't be easy to lose my work.

In fact, currently, you have no excuse to not use a control source tool for any project. Because they are more powerful and flexible than before and scale with your needs.

Related Topic