13.Distributed Version Control System_compressed
13.Distributed Version Control System_compressed
System
• A distributed version control system (DVCS) brings a local copy of
the complete repository to every team member’s computer, so they
can commit, branch, and merge locally.
• The server doesn’t have to store a physical file for each branch, it just
needs the differences between each commit
Advantagaes of DVCS
• Reliable backup copies
• Fast merging and flexible branching
• Rapid feedback and fewer merge conflicts
• Flexibility to work offline
• Enhanced Security
• Reduced Dependency on Central Server
• Enhanced Collaboration
Repository
• A repository is the place where all the files of a project are stored,
organized and maintained. They contain a change history, giving
teams transparency and control over different possible versions.
Mono Repository
• It’s a software development strategy in which a company's entire code base is
stored in a single repository.
Prime behaviour of a Mono repository
• Centralisation: The codebase is contained in a single repository encompassing
multiple projects.
• Visibility: Code is visible and accessible for all intended users
• Synchronisation: The development process is trunk-based; engineers commit
to the head of the repo.
• Completeness: Any project in the repo can be built only from dependencies
also checked into the repo. Dependencies are un-versioned; projects must use
whatever version of their dependency is at the repo head.
• Standardisation: A shared set of tooling governs how engineers interact with
the code, including building, testing, browsing, and reviewing code
Benefits
• Single Source of Truth
• Coding Styles / Architectural Patterns
• Simplified Dependency Management
• Simplified Code Sharing
• Large-Scale Code Refactoring
• Diamond Dependency Problem
Disadvantages
1. Scaling Issues
• The repo can become very large and difficult to manage as projects
grow.
2. Team Independence
• Teams can develop, test, and deploy independently.
4. Customizable CI/CD
• Separate CI/CD pipelines for each repo.
Disadvantages
1. Dependency Management
• Dependencies across repos can become complex.
2. Cross-repo Coordination
• Changes affecting multiple services require coordination.