Back to roadmaps git Course

Distributed Version Control and Git Internal Working Models

Before Git, centralized version control systems (like SVN) required a constant connection to a central server to track files or make commits. Git is a Distributed Version Control System (DVCS), meaning every developer holds a full copy of the project history locally.


1. Decentralized Advantage

  • Offline Capabilities: You can commit code, review history logs, and manage branches without an active internet connection.
  • Speed: Operations are local and instant.
  • Data Security: If a remote server crashes, any developer's local repository clone can be used to restore the full version history.

2. The Three Stages of Git

To understand Git, you must understand its three local storage zones:

graph LR
    A[Working Directory] -->|git add| B[Staging Area]
    B -->|git commit| C[Local Repository]
    C -->|git checkout| A
  • Working Directory (Workspace): The folder on your disk where you edit code. Files here are either untracked or modified.
  • Staging Area (Index): A preparation zone. You gather modified files here before committing them to history.
  • Local Repository (.git folder): The database where Git stores metadata and the committed object database for your project.
Published on Last updated: