Lably
Skip to content

Distributed version control

Software engineering tool

  • 5 min read
  • 3 chapters

Related on Lably

Through Peer-to-peer and Free and open-source software

Distributed vs. centralized

Distributed version control systems (DVCS) use a peer-to-peer approach to version control, as opposed to the client–server approach of centralized systems. Distributed revision control synchronizes repositories by transferring patches from peer to peer. There is no single central version of the codebase; instead, each user has a working copy and the full change history.

Advantages of DVCS (compared with centralized systems) include:

  • Allows users to work productively when not connected to a network.
  • Common operations (such as commits, viewing history, and reverting changes) are faster for DVCS, because there is no need to communicate with a central server. With DVCS, communication is necessary only when sharing changes among other peers.
  • Allows private work, so users can use their changes even for early drafts they do not want to publish.
  • Working copies effectively function as remote backups, which avoids relying on one physical machine as a single point of failure.
  • Allows various development models to be used, such as using development branches or a Commander/Lieutenant model.
  • Permits centralized control of the "release version" of the project
  • On FOSS software projects it is much easier to create a project fork from a project that is stalled because of leadership conflicts or design disagreements.

Disadvantages of DVCS (compared with centralized systems) include:

  • Initial checkout of a repository is slower as compared to checkout in a centralized version control system, because all branches and revision history are copied to the local machine by default.
  • The lack of locking mechanisms that is part of most centralized VCS and still plays an important role when it comes to non-mergeable binary files such as graphic assets or too complex single file binary or XML packages (e.g. office documents, PowerBI files, SQL Server Data Tools BI packages, etc.).
  • Additional storage required for every user to have a complete copy of the complete codebase history.
  • Increased exposure of the code base since every participant has a locally vulnerable copy.

Some originally centralized systems now offer some distributed features. Team Foundation Server and Visual Studio Team Services now host centralized and distributed version control repositories via hosting Git.

Similarly, some distributed systems now offer features that mitigate the issues of checkout times and storage costs, such as the Virtual File System for Git developed by Microsoft to work with very large codebases, which exposes a virtual file system that downloads files to local storage only as they are needed.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication