Version Control – Advantages of Using a DVCS for a Solo Developer

dvcsversion control

Right now, I use visual svn on my server, and have ankhsvn/tortoise on my personal machine. It works fine enough, and I don't have to change, but if I can see some benefits of using a DVCS, then I might give it a go.

However, if there's no point or difference using it without other people, then I won't bother.

So again, I ask, are there any benefits to using a DVCS when you're the only developer?

Best Answer

Yes! I think the biggest benefit is the better branching + merging support offered by many DVCSes. Branching and merging is kind of a pain in the ass in SVN; it's annoying enough that it's not worth the time to create small, short-lived branches for quick feature additions, bug fixes, or experimentation, but merging is also annoying enough that it's a pain to create long-lived branches as well. On the other hand, branching and merging is a breeze in Git, so much so that I create a (local) branch for nearly every bug fix or feature I work on.

I think the tools offered by Git for visualizing repos, grepping logs, etc., are a lot better than in SVN, too (although that's more a Git thing than specific to a DVCS).

A DVCS also doesn't require a central server; when using SVN as a developer, you have to create a local repo to push into, which isn't a requirement with Git, since every repo contains the full history. As a corollary, archiving a repo is just a matter of zipping up your project -- there's no "central database" to back up.

I started using Git nearly four years ago, after using SVN for a while, and I haven't looked back.