Skip to content

Centralized vs Distributed

Version control systems can be divided into two main models: Centralized Version Control Systems and Distributed Version Control Systems.

The main difference between them is where the repository history is stored and how developers access it.

In a Centralized Version Control System (CVCS), one central server stores the main repository and its version history.

Developers connect to that server and check out a working copy of the project onto their machines. Their local machines usually contain the files they are currently working on, while the central server remains the primary source of the project’s history.

SVN is a common example of a centralized version control system.

  1. A central server stores the repository and its history.
  2. Each developer checks out a working copy.
  3. Developers edit the project files on their machines.
  4. They connect to the central server to commit or retrieve changes.
  5. The central repository acts as the team’s source of truth.
  • The project is managed from one central location.
  • Team members work against one shared repository.
  • Access control and administration can be simpler.
  • It is easy to understand which repository is the official one.
  • Many operations require a network connection.
  • If the central server becomes unavailable, collaboration may stop.
  • Developers may be unable to commit or retrieve changes during the outage.
  • If the server is permanently lost without a valid backup, the project history may also be lost.
  • The central server represents a single point of failure.

In a Distributed Version Control System (DVCS), every developer receives a complete clone of the repository.

A clone contains more than the current project files. It also contains the repository’s history, commits, branches, and other Git data.

Git is a distributed version control system.

  1. Each developer clones the complete repository.
  2. Every clone contains the full project history.
  3. Developers can edit files, create commits, inspect history, and create branches locally.
  4. A network connection is only required when developers need to synchronize changes with another repository.
  5. Synchronization is commonly performed using operations such as push, pull, and fetch.
  • Every developer has a complete copy of the repository and its history.
  • Most Git operations can be performed offline.
  • Developers can create commits and branches without contacting a central server.
  • Local clones provide additional protection against losing the project history.
  • Work can continue locally when a hosting service is temporarily unavailable.
  • Teams can use different collaboration workflows.

Having a distributed repository does not mean that every developer works separately forever.

Teams commonly use a shared remote repository hosted on a service such as GitHub, GitLab, or Bitbucket. This remote repository provides a convenient central meeting point where team members exchange and review their changes.

However, Git remains distributed because every developer still has a complete local repository.

If GitHub becomes temporarily unavailable, developers can still:

  • Edit project files.
  • View the local repository history.
  • Create local commits.
  • Create and switch between branches.
  • Compare and restore local versions.

However, they cannot synchronize with the unavailable GitHub remote. Operations such as push, pull, and fetch will not work until the service becomes available again.

This demonstrates how Git combines the resilience of distributed version control with the convenience of a shared collaboration server.

Centralized vs Distributed: Quick Comparison

Section titled “Centralized vs Distributed: Quick Comparison”

Centralized VCS

Repository history
Stored mainly on one central server.
Local copy
Usually a working copy.
Offline commits
Usually unavailable.
Offline branches and history
Limited or unavailable.
Network usage
Required for many operations.
Server outage
Collaboration and many operations stop.
Single point of failure
Central server can be one.
Examples
SVN, CVS.

Distributed VCS

Repository history
A complete history exists in every clone.
Local copy
A complete repository clone.
Offline commits
Available.
Offline branches and history
Available.
Network usage
Mainly required for synchronization.
Server outage
Local work continues, but synchronization stops.
Single point of failure
Reduced because complete clones exist.
Examples
Git, Mercurial.

A centralized system keeps the main repository and its history on one server.

A distributed system gives every developer a complete copy of the repository and its history.

Git is distributed, while services such as GitHub allow teams to use a shared remote repository as a central collaboration point. This gives developers the benefits of both approaches: complete local repositories and an organized place to share their work.