<p>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. </p>

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

<p>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.</p>

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

<p><a href="http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/" rel="nofollow noreferrer">Intro to Distributed Version Control</a></p>

<p><a href="http://en.wikipedia.org/wiki/Distributed_revision_control" rel="nofollow noreferrer">Wikipedia Entry</a></p>

[{'answer_id': 26861, 'author': 'Guy', 'author_id': 1463, 'author_profile': 'https://Stackoverflow.com/users/1463', 'pm_score': 1, 'selected': False, 'text': "<p>Using Subversion with SourceForge and other servers over a number of different connections with medium sized teams and it's working very well.</p>\n"}, {'answer_id': 26886, 'author': 'Chris Blackwell', 'author_id': 1329401, 'author_profile': 'https://Stackoverflow.com/users/1329401', 'pm_score': 0, 'selected': False, 'text': "<blockquote>\n  <p>Using Subversion</p>\n</blockquote>\n\n<p>Subversion isn't distributed, so that makes me think I need a wikipedia link in case people aren't sure what I'm talking about :)</p>\n"}, {'answer_id': 26900, 'author': 'Martin Klinke', 'author_id': 1793, 'author_profile': 'https://Stackoverflow.com/users/1793', 'pm_score': 2, 'selected': False, 'text': '<p>Not using distributed source control myself, but maybe these related questions and answers give you some insights:</p>\n\n<ul>\n<li><a href="https://stackoverflow.com/questions/237/distributed-source-control-options">Distributed source control options</a></li>\n<li><a href="https://stackoverflow.com/questions/871/why-is-git-better-than-subversion">Why is git better than Subversion</a></li>\n</ul>\n'}, {'answer_id': 26929, 'author': 'Ian Patrick Hughes', 'author_id': 2213, 'author_profile': 'https://Stackoverflow.com/users/2213', 'pm_score': 1, 'selected': False, 'text': '<p>I am a huge proponent of centralized source control for a lot of reasons, but I did try BitKeeper on a project briefly. Perhaps after years of using a centralized model in one format or another (Perforce, Subversion, CVS) I just found distributed source control difficult to use.</p>\n\n<p>I am of the mindset that our tools should never get in the way of the actual work; they should make work easier. So, after a few head pounding experiences, I bailed. I would advise doing some really hardy tests with your team before rocking the boat because the model is very different than what most devs are probably accustomed to in the SCM world. </p>\n'}, {'answer_id': 26969, 'author': 'James A. Rosen', 'author_id': 1190, 'author_profile': 'https://Stackoverflow.com/users/1190', 'pm_score': 2, 'selected': False, 'text': "<p>I really love Git, especially with GitHub.  It's so nice being able to commit and roll back locally.  And cherry-picking merges, while not trivial, is not terribly difficult, and far more advanced than anything Svn or CVS can do.</p>\n"}, {'answer_id': 26973, 'author': 'Jason Sparks', 'author_id': 512, 'author_profile': 'https://Stackoverflow.com/users/512', 'pm_score': 3, 'selected': False, 'text': "<p>At my workplace we switched to Git from CVS about two months ago (the majority of my experience is with Subversion). While there was a learning curve involved in becoming familiar with the distributed system, I've found Git to be superior in two key areas: flexibility of working environment and merging.</p>\n\n<p>I don't have to be on our VPN, or even have network connectivity at all, to have access to full versioning capabilities. This means I can experiment with ideas or perform large refactorings wherever I happen to be when the urge strikes, without having to remember to check in that huge commit I've built up or worrying about being unable to revert when I make a mess.</p>\n\n<p>Because merges are performed client-side, they are much faster and less error-prone than initiating a server-side merge. </p>\n"}, {'answer_id': 26992, 'author': 'skinp', 'author_id': 2907, 'author_profile': 'https://Stackoverflow.com/users/2907', 'pm_score': 2, 'selected': False, 'text': "<p>I personnaly use Mercurial source control system. I've been using it for a bit more than a year right now. It was actually my first experience with a VSC.</p>\n\n<p>I tried Git, but never really pushed into it because I found it was too much for what I needed. Mercurial is really easy to pick up if you're a Subversion user since it shares a lot of commands with it. Plus I find the management of my repositories to be really easy.</p>\n\n<p>I have 2 ways of sharing my code with people:</p>\n\n<ul>\n<li>I share a server with a co-worker and we keep a main repo for our project.</li>\n<li>For some OSS project I work on, we create patches of our work with Mercurial (hg export) and the maintener of the project just apply them on the repository (hg import)</li>\n</ul>\n\n<p>Really easy to work with, yet very powerful. But generally, choosing a VSC really depends on our project's needs...</p>\n"}, {'answer_id': 27005, 'author': 'Tall Jeff', 'author_id': 1553, 'author_profile': 'https://Stackoverflow.com/users/1553', 'pm_score': 2, 'selected': False, 'text': '<p>Back before we switched off of Sun workstations for embedded systems development we were using Sun\'s <a href="http://docs.sun.com/source/806-3573/TeamWareTOC.html" rel="nofollow noreferrer">TeamWare</a> solution. TeamWare is a fully distribution solution using SCCS as the local repository file revision system and then wrappers that with a set of tools to handle the merging operations (done through branch renaming) back to the centralized repositories of which there can be many. In fact, because it is distributed, there really is no master repository per se\' (except by convention if you want it) and all users have their own copies of the entire source tree and revisions. During "put back" operations, the merge tool using 3-way diffs algorithmically sorts out what is what and allows you combine the changes from different developers that have accumulated over time.</p>\n\n<p>After switching to Windows for our development platform, we ended up switching to <a href="http://www.accurev.com/" rel="nofollow noreferrer">AccuRev</a>. While AccuRev, because it depends on a centralized server, is not truely a distributed solution, logically from a workflow model comes very close. Where TeamWare would have had completely seperate copies of everything at each client, including all the revisions of all files, under AccuRev this is maintained in the central database and the local client machines only have the flat file current version of things for editing locally. However these local copies can be versioned through the client connection to the server and tracked completely seperately from any other changes (ie: branches) implicitly created by other developers </p>\n\n<p>Personally, I think the distributed model implemented by TeamWare or the sort of hybrid model implemented by AccuRev is superior to completely centralized solutions. The main reason for this is that there is no notion of having to check out a file or having a file locked by another user. Also, users don\'t have to create or define the branches; the tools do this for you implicitly. When there are larger teams or different teams contributing to or maintaining a set of source files this resolves "tool generated" locking related collisions and allows the code changes to be coordinated more at the developer level who ultimately have to coordinate changes anyway. In a sense, the distributed model allows for a much finer grained "lock" rather than the course grained locking instituted by the centralized models.</p>\n'}, {'answer_id': 27033, 'author': 'tghw', 'author_id': 2363, 'author_profile': 'https://Stackoverflow.com/users/2363', 'pm_score': 6, 'selected': True, 'text': "<p>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:</p>\n\n<ol>\n<li><strong>Local version control.</strong> 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.</li>\n<li><strong>Fewer merge conflicts.</strong> 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.</li>\n<li><strong>Separate repos as branches.</strong> 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.</li>\n<li><strong>Speed.</strong> Mercurial is much faster to work with, mostly because most of your common operations are local.</li>\n</ol>\n\n<p>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.</p>\n"}, {'answer_id': 29923, 'author': 'cnu', 'author_id': 1448, 'author_profile': 'https://Stackoverflow.com/users/1448', 'pm_score': 3, 'selected': False, 'text': "<p>At the place where I work, we decided to move from SVN to Bazaar (after evaluating git and mercurial). Bazaar was easy to start off, with simple commands (not like the 140 commands that git has)</p>\n\n<p>The advantages that we see is the ability to create local branches and work on it without disturbing the main version. Also being able to work without network access, doing diffs is faster. </p>\n\n<p>One command in bzr which I like is the shelve extension. If you start working on two logically different pieces of code in a single file and want to commit only one piece, you can use the shelve extension to literally shelve the other changes later. In Git you can do the same with playing around in the index(staging area) but bzr has a better UI for it. </p>\n\n<p>Most of the people were reluctant to move over as they have to type in two commands to commit and push (bzr ci + bzr push). Also it was difficult for them to understand the concept of branches and merging (no one uses branches or merges them in svn).</p>\n\n<p>Once you understand that, it will increase the developer's productivity. Till everyone understands that, there will be inconsistent behaviour among everyone. </p>\n"}, {'answer_id': 30270, 'author': 'Hamish Downer', 'author_id': 3189, 'author_profile': 'https://Stackoverflow.com/users/3189', 'pm_score': 1, 'selected': False, 'text': '<p>I\'ve used <a href="http://bazaar-vcs.org/" rel="nofollow noreferrer">bazaar</a> for a little while now and love it.  Trivial branching and merging back in give great confidence in using branches as they should be used.  (I know that central vcs tools should allow this, but the common ones including subversion don\'t allow this easily).</p>\n\n<p>bzr supports quite a few different <a href="http://bazaar-vcs.org/Workflows" rel="nofollow noreferrer">workflows</a> from solo, through working as a centralised repository to fully distributed.  With each branch (for a developer or a feature) able to be merged independently, code reviews can be done on a per branch basis.</p>\n\n<p>bzr also has a great plugin (<a href="http://bazaar-vcs.org/BzrForeignBranches/Subversion" rel="nofollow noreferrer">bzr-svn</a>) allowing you to work with a subversion repository.  You can make a copy of the svn repo (which initially takes a while as it fetches the entire history for your local repo).  You can then make branches for different features.  If you want to do a quick fix to the trunk while half way through your feature, you can make an extra branch, work in that, and then merge back to trunk, leaving your half done feature untouched and outside of trunk.  Wonderful.  Working against subversion has been my main use so far.</p>\n\n<p>Note I\'ve only used it on Linux, and mostly from the command line, though it is meant to work well on other platforms, has GUIs such as <a href="http://bazaar-vcs.org/TortoiseBzr" rel="nofollow noreferrer">TortoiseBZR</a> and a lot of work is being done on integration with <a href="http://bazaar-vcs.org/IDEIntegration" rel="nofollow noreferrer">IDEs</a> and the like.</p>\n'}, {'answer_id': 30657, 'author': 'Ben Collins', 'author_id': 3279, 'author_profile': 'https://Stackoverflow.com/users/3279', 'pm_score': 2, 'selected': False, 'text': '<p>My group at work is using Git, and it has been all the difference in the world.  We were using SCCS and a steaming pile of csh scripts to manage quite large and complicated projects that shared code between them (attempted to, anyway).</p>\n\n<p>With Git, submodule support makes a lot of this stuff easy, and only a minimum of scripting is necessary.  Our release engineering effort has gone way, way down because branches are easy to maintain and track.  Being able to cheaply branch and merge really makes it reasonably easy to maintain a single collection of sources across several projects (contracts), whereas before, any disruption to the typical flow of things was very, very expensive.  We\'ve also found the scriptabability of Git to be a <strong>huge</strong> plus, because we can customize its behavior through hooks or through scripts that do <code>. git-sh-setup</code>, and it doesn\'t seem like a pile of kludges like before.</p>\n\n<p>We also sometimes have situations in which we have to maintain our version control across distributed, non-networked sites (in this case, disconnected secure labs), and Git has mechanisms for dealing with that quite smoothly (bundles, the basic clone mechanism, formatted patches, etc).  </p>\n\n<p>Some of this is just us stepping out of the early 80s and adopting some modern version control mechanisms, but Git "did it right" in most areas.</p>\n\n<p>I\'m not sure of the extent of answer you\'re looking for, but our experience with Git has been very, very positive.</p>\n'}, {'answer_id': 170080, 'author': 'Dickon Reed', 'author_id': 22668, 'author_profile': 'https://Stackoverflow.com/users/22668', 'pm_score': 3, 'selected': False, 'text': '<p>My company currently uses Subversion, CVS, Mercurial and git.</p>\n\n<p>When we started five years ago we chose CVS, and we still use that in my division for our main development and release maintenance branch. However, many of our developers use Mercurial individually as a way to have private checkpoints without the pain of CVS branches (and particularly merging them) and we are starting to use Mercurial for some branches that have up to about 5 people. There\'s a good chance we\'ll finally ditch CVS in another year. Our use of Mercurial has grown organically; some people still never even touch it, because they are happy with CVS. Everyone who has tried Mercurial has ended up being happy with it, without much of a learning curve.</p>\n\n<p>What works really nicely for us with Mercurial is that our (home brewed) continuous integration servers can monitor developer Mercurial repositories as well as the mainline. So, people commit to their repository, get our continuous integration server to check it, and then publish the changeset. We support lots of platforms so it is not feasible to do a decent level of manual checks. Another win is that merges are often easy, and when they are hard you have the information you need to do a good job on the merge. Once someone gets the merged version to work, they can push their merge changesets and then no one else has to repeat the effort.</p>\n\n<p>The biggest obstacle is that you need to rewire your developers and managers brains so that they get away from the single linear branch model. The best medicine for this is a dose of Linus Torvalds telling you you\'re <a href="http://www.youtube.com/watch?v=4XpnKHJAok8" rel="nofollow noreferrer">stupid and ugly</a> if you use centralised SCM. Good history visualisation tools would help but I\'m not yet satisfied with what\'s available. </p>\n\n<p>Mercurial and CVS both work well for us with developers using a mix of Windows, Linux and Solaris, and I\'ve noticed no problems with timezones. (Really, this isn\'t too hard; you just use epoch seconds internally, and I\'d expect all the major SCM systems get this right).</p>\n\n<p>It was possible, with a fair amount of effort, to import our mainline CVS history into Mercurial. It would have been easier if people had not deliberately introduced corner cases into our mainline CVS history as a way to test history migration tools. This included merging some Mercurial branches into the CVS history, so the project looks like it was using from day one. </p>\n\n<p>Our silicon design group chose Subversion. They are mainly eight timezones away from my office, and even over a fairly good dedicated line between our offices SUbversion checkouts are painful, but workable. A big advantage of centralised systems is that you can potentially check big binaries into it (e.g. vendor releases) without making all the distributed repositories huge. </p>\n\n<p>We use git for working with Linux kernel. Git would be more suitable for us once a native Windows version is mature, but I think the Mercurial design is so simple and elegant that we\'ll stick with it.</p>\n'}, {'answer_id': 240854, 'author': 'mempko', 'author_id': 8863, 'author_profile': 'https://Stackoverflow.com/users/8863', 'pm_score': 0, 'selected': False, 'text': '<p>Been using darcs 2.1.0 and its great for my projects. Easy to use. Love cherry picking changes.</p>\n'}, {'answer_id': 326398, 'author': 'Norman Ramsey', 'author_id': 41661, 'author_profile': 'https://Stackoverflow.com/users/41661', 'pm_score': 2, 'selected': False, 'text': "<p>Have used darcs on a big project (GHC) and for lots of small projects.  I have a love/hate relationship with darcs.</p>\n\n<p>Pluses: incredibly easy to set up repository.  Very easy to move changes around between repositories.   Very easy to clone and try out 'branches' in separate repositories.  Very easy to make 'commits' in small coherent groups that makes sense.  Very easy to rename files and identifiers.</p>\n\n<p>Minuses: no notion of history---you can't recover 'the state of things on August 5'.  I've never really figured out how to use darcs to go back to an earlier version.</p>\n\n<p>Deal-breaker: darcs does not scale.  I (and many others) have gotten into big trouble with GHC using darcs.  I've had it hang with 100% CPU usage for 9 days trying to pull in\n3 months' worth of changes.  I had a bad experience last summer where I lost two weeks\ntrying to make darcs function and eventually resorted to replaying all my changes by hand into a pristine repository.</p>\n\n<p>Conclusion: darcs is great if you want a simple, lightweight way to keep yourself from shooting yourself in the foot for your hobby projects.  But even with some of the performance problems addressed in darcs 2, it is still not for industrial strength stuff.  I will not really believe in darcs until the vaunted 'theory of patches' is something a bit more than a few equations and some nice pictures; I want to see a real theory published in a refereed venue.  It's past time.</p>\n"}, {'answer_id': 738165, 'author': 'TheFogger', 'author_id': 86891, 'author_profile': 'https://Stackoverflow.com/users/86891', 'pm_score': 0, 'selected': False, 'text': "<p>I use Git at work, together with one of my coworkers. The main repository is SVN, though. We often have to switch workstations and Git makes it very easy to just pull changes from a local repository on another machine. When we're working as a team on the same feature, merging our work is effortless.</p>\n\n<p>The git-svn bridge is a little wonky, because when checking into SVN it rewrites all the commits to add its git-svn-id comment. This destroys the nice history of merges between my coworker's repo an mine. I predict that we wouldn't use a central repository at all if every teammember would be using Git.</p>\n\n<p>You didn't say what os you develop on, but Git has the disadvantage that you have to use the command line to get all the features. Gitk is a nice gui for visualizing the merge history, but the merging itself has to be done manually. Git-Gui and the Visual Studio plugins are not that polished yet.</p>\n"}, {'answer_id': 738292, 'author': 'David Thornley', 'author_id': 14148, 'author_profile': 'https://Stackoverflow.com/users/14148', 'pm_score': 1, 'selected': False, 'text': "<p>I'm playing around with Mercurial for my home projects.  So far, what I like about it is that I can have multiple repositories.  If I take my laptop to the cabin, I've still got version control, unlike when I ran CVS at home.  Branching is as easy as <code>hg clone</code> and working on the clone.</p>\n"}, {'answer_id': 745646, 'author': 'pablo', 'author_id': 72456, 'author_profile': 'https://Stackoverflow.com/users/72456', 'pm_score': 0, 'selected': False, 'text': '<p>We use distributed version control (<a href="http://www.plasticscm.com" rel="nofollow noreferrer">Plastic SCM</a>) for both multi-site and disconnected scenarios.</p>\n\n<p>1- Multi-site: if you have distant groups, sometimes you can\'t rely on the internet connection, or it\'s not fast enough and slows down developers. Then having independent server which can synchronize back (Plastic replicates branches back and forth) is very useful and speed up things. It\'s probably one of the most common scenarios for companies since most of them are still concerned of "totally distributed" practices where each developer has its own replicated repository.</p>\n\n<p>2- Disconnected (or truly distributed if you prefer): every developer has his own repository which is replicated back and forth with his peers or the central location. It\'s very convenient to go to a customer\'s location or just go home with your laptop, and continue being able to switch branches, checkout and checkin code, look at the history, run annotates and so on, without having to access the remote "central" server. Then whenever you go back to the office you just replicate your changes (normally branches) back with a few clicks.</p>\n'}]
['https://Stackoverflow.com/questions/26845', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1329401/']