Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you use distributed version control?

I'd like to hear from people who are using distributed version control (aka distributed revision control, decentralized version control) and how they are finding it. What are you using, Mercurial, Darcs, Git, Bazaar? Are you still using it? If you've used client/server rcs in the past, are you finding it better, worse or just different? What could you tell me that would get me to jump on the bandwagon? Or jump off for that matter, I'd be interested to hear from people with negative experiences as well.

I'm currently looking at replacing our current source control system (Subversion) which is the impetus for this question.

I'd be especially interested in anyone who's used it with co-workers in other countries, where your machines may not be on at the same time, and your connection is very slow.

If you're not sure what distributed version control is, here are a couple articles:

Intro to Distributed Version Control

Wikipedia Entry

like image 559
Chris Blackwell Avatar asked Aug 25 '08 20:08

Chris Blackwell


People also ask

Why is distributed version control better?

Here is what many cite as distributed source control system advantages compared to other systems like centralized version control: Branching and merging can happen automatically and quickly. Developers have the ability to work offline. Multiple copies of the software eliminate reliance on a single backup.

Is CVS centralized or distributed?

and they can be classified into two classes: Distributed VCS: Git, Mercurial. Centralized VCS: CVS, Perforce, SVN.

What are the advantages of distributed over centralized version control systems?

Unlike a centralized VCS, a distributed version control system enables every user to have a local copy of the running history on their machine, so if there's an outage, every local copy becomes a backup copy and team members can continue to development offline.

What are the shortcomings of the distributed version control system?

Downsides of Distributed Version Control Systems:DVCS enables you to clone the repository – this could mean a security issue. Managing non-mergeable files is contrary to the DVCS concept. Working with a lot of binary files requires a huge amount of space, and developers can't do diffs.


1 Answers

I've been using Mercurial both at work and in my own personal projects, and I am really happy with it. The advantages I see are:

  1. Local version control. Sometimes I'm working on something, and I want to keep a version history on it, but I'm not ready to push it to the central repositories. With distributed VCS, I can just commit to my local repo until it's ready, without branching. That way, if other people make changes that I need, I can still get them and integrate them into my code. When I'm ready, I push it out to the servers.
  2. Fewer merge conflicts. They still happen, but they seem to be less frequent, and are less of a risk, because all the code is checked in to my local repo, so even if I botch the merge, I can always back up and do it again.
  3. Separate repos as branches. If I have a couple development vectors running at the same time, I can just make several clones of my repo and develop each feature independently. That way, if something gets scrapped or slipped, I don't have to pull pieces out. When they're ready to go, I just merge them together.
  4. Speed. Mercurial is much faster to work with, mostly because most of your common operations are local.

Of course, like any new system, there was some pain during the transition. You have to think about version control differently than you did when you were using SVN, but overall I think it's very much worth it.

like image 146
tghw Avatar answered Oct 17 '22 07:10

tghw