19

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?

4
  • 1
    See similar post on stackoverflow: stackoverflow.com/questions/179161/…. Everything you need to know is summed up nicely there.
    – ysolik
    Oct 10, 2010 at 4:05
  • So my question got closed as an exact duplicate as this one. Unfortunately this question doesn't answer mine. Do you guys push and pull from the master when you're a solo developer, or do you branch and merge? I'm just trying to see what the right way to use a DVCS is when you're solo Feb 8, 2012 at 0:58
  • 1
    backups are essentially just another clone. That may be very important some day. Also git tooling is lightyears ahead of svn.
    – user1249
    Mar 12, 2012 at 8:25
  • Do you ever work on a laptop, away from your server? Apr 14, 2012 at 9:08

4 Answers 4

19

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.

6
  • Opinions opinions: programmers.stackexchange.com/questions/940/…
    – TheLQ
    Oct 10, 2010 at 4:43
  • 4
    There is a view that DVCSs don't making merging easier, but that DVCS users are more practised at performing merges. This gives the subjective appearance of merges being easier. Of course it is the subjective view that matters.
    – Richard
    Oct 10, 2010 at 8:04
  • 3
    DVCS doesn not exclusively equal git
    – Murph
    Oct 10, 2010 at 9:46
  • 6
    @Richard But thats wrong, centralized tools tend to have a linear history that doesn't support complex merges well. Oct 10, 2010 at 11:51
  • 2
    @Murph: This is true, but I use Git, so I used it in my example.
    – mipadi
    Oct 10, 2010 at 13:48
7

I use a DVCS a lot for my own personal stuff. (I'm one of those guys that at $HOME in git.) There are several advantages:

  • It makes replication between my laptop and desktop and lab computers really easy. Though this was true of SVN also...
  • I can commit on the laptop even when I don't have internet access.
  • Backups are as simple as a git pull.
  • I can use git citool to break up lots of changes into logically-sized commits, even if I've made lots of unrelated changes before deciding to commit. I'm not aware of a tool to do this in Subversion.
  • When I have to patch an open source project, it's easier to keep things organized by making a new git repository in the project directory than it is to make a second copy of whatever source tree I'm patching. (You can’t do this easily with Subversion because you need a separate repository somewhere else on your hard disk entirely.)
  • I use the easy branching features to check in revisions I get from other people. For example, when I edit a conference paper with my advisor, even though he doesn't have access to the repository, I can send him a copy of the paper, and check in his revisions in a branch based off the version that I sent him, and then use git merge to merge his revisions with anything I've done in the mean time.

Git got me used to thinking about all of my changes in logical chunks, a lot more than Subversion ever did.

1
  • (or git fetch for a mirror)
    – user1249
    Jan 26, 2011 at 13:32
5

My mother turns off the modem when it is too late to sleep. DVCS allows me to continue to work with VCS after modem is off.

2
  • 1
    I would term it as "being able to work from a plane" or "being able to work when bitbucket.com goes down" but +1 for covering the offline case. Apr 14, 2012 at 15:30
  • Also outdoor places without 3G network.
    – linquize
    Jan 19, 2013 at 3:42
3

Well, the default answer would be, "If (whatever you're using now) works for you, why would you change?".

But, yes, even if there is no reason for a change, I find using DVCS somewhat easier than the "older models". The following goes for Mercurial, which I use the most, so your mileage may vary, depending on which system you're going to use.

  • really easy to use - I figured out all the commands I need in an hour or so
  • everything is local (you don't need the remote server to be online)
  • very easy branching / merging - you don't even think about those things anymore
  • easy cloning (also, a type of branching) - and generally, a much more user friendly interface (I found it more enjoyable than git's on windows; also some concepts are simpler; i.e. don't require thinking on my side, therefore leading to less fiddling with VS and more work done)
  • works nice with svn

Jumping gate to an intro to Mercurial and a blog (pretty colours ;-) with useful tips.

2
  • Hmm, CVS used to work for us, but nowhere near as well as subversion when we moved to it. New toys give you new capabilities - so for precisely this reason I'm looking at whether Mercurial might now be a better option (especially as I use FogBugz) and also the potential of veracity...
    – Murph
    Oct 10, 2010 at 18:34
  • 3
    Switching from SVN to Mercurial was a revelation for me. It was inspired by Joel's wonderful hginit.com, and I've never looked back. Feb 7, 2012 at 18:24

Your Answer

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

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