Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the advantages of a distributed version control for a team that is effectively never distributed?

When working remotely, our team only has access to our source code by remote desktop into our office PCs so we never really work in offline mode. Does a distributed version control system like Mercurial or Git still give us advantages over our current centralized Subversion set up? If so, what are they? Are there any drawbacks or pitfalls? I've read in numerous places that shifting to distributed version control requires a change in thinking. Can someone explain what needs to change in this regard?

like image 639
lukeck Avatar asked Jun 01 '10 04:06

lukeck


People also ask

What are two benefits of using a distributed version control system compared to other version control systems choose two?

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.

What are the advantages of distributed version control systems compared to Centralised systems?

DVCS is faster than CVCS because you don't need to communicate with the remote server for each and every command. You do everything locally which gives you the benefit to work faster than CVCS. Working on branches is easy in DVCS.

What are two advantages of version control software?

Benefits of Version Control The Version Control System helps manage the source code for the software team by keeping track of all the code modifications. It also protects the source code from any unintended human error and consequences.


1 Answers

As explained in the differences between DVCS and CVCS (Centralized VCS), the main advantages are:

  • local commits (you can commit more often in private branches, then clean up the history you want to push to other repos)
  • publication process (you pull from multiple repos, or quickly established intermediate repos to push to, where you can do intermediate tasks like continuous integration tests)

That last point required the most "change in thinking" and is a bit scary ("I can pull from any repo?!")
But once you realize the benefits, you can really have more productive development cycles because you are able to monitor (by fetching commits from your peers) the development of some of your colleagues. If they are developing a function that you need, you can start integrating it sooner.
(The thing to remember with a DVCS is that is doesn't prevent the setup of a "central" repo, for other developers to pull from)

As for continuous integration, instead of pushing directly from your repo to a central server in charge of CI, you can push to a local repo on your desktop, which will run all the tests, before pushing automatically (if "green") the code to a "central" repo.
It is so effective that you can now push to the official central repo a code that "never breaks the build", rendering your CI server pretty much useless ;)

like image 183
VonC Avatar answered Oct 15 '22 19:10

VonC