Your team manages a large monorepo in Azure Repos containing multiple microservices. The repository has grown to over 10,000 files and 500 MB. Developers report that cloning and fetching operations are slow, often taking more than 10 minutes. Additionally, the CI pipeline triggers on every push to any branch, causing long queue times. You need to improve the developer experience and CI efficiency without splitting the repository. What should you do?
Trap 1: Configure shallow clone (depth=1) for all operations and disable CI…
A shallow clone with depth=1 reduces commit history but still materializes the entire filesystem tree at the current commit, so every microservice agent downloads all files in the monorepo—the size problem remains. Disabling CI triggers on feature branches removes early validation and lets broken changes land on main before anyone notices, undermining the goal of per-service fast feedback. While path-based triggers could still work, shallow clone does not address the download bottleneck and depth=1 can break tooling that relies on history.
Trap 2: Break the monorepo into multiple smaller repositories and use Git…
Splitting the monorepo into multiple repositories and chaining them with submodules reverses the requirement to keep a monorepo, and introduces severe operational friction. Every cross-service change requires committing a new submodule pointer plus the parent reference, making atomic multi-service commits impossible and forcing fragile synchronization between repositories. Sparse checkout solves the same size problem without dismantling the monorepo, which is exactly why the other options are unnecessary and wrong.
Trap 3: Implement Git Virtual File System (GVFS) for the repository and use…
GVFS (Git Virtual File System) is an older Microsoft tool that requires a virtual filesystem filter driver and is primarily supported on Windows; Azure Repos does not provide GVFS server support, so it cannot be used with a cloud-hosted Git repository. Even if it were available, restricting CI triggers to only the main branch removes all pre-integration feedback from feature branches, so broken code is only discovered after merging. The correct technique is to use sparse checkout plus path-based triggers, which works natively in Azure Pipelines without proprietary clients.
- A
Configure shallow clone (depth=1) for all operations and disable CI triggers on feature branches.
Why wrong: A shallow clone with depth=1 reduces commit history but still materializes the entire filesystem tree at the current commit, so every microservice agent downloads all files in the monorepo—the size problem remains. Disabling CI triggers on feature branches removes early validation and lets broken changes land on main before anyone notices, undermining the goal of per-service fast feedback. While path-based triggers could still work, shallow clone does not address the download bottleneck and depth=1 can break tooling that relies on history.
- B
Break the monorepo into multiple smaller repositories and use Git submodules to manage dependencies.
Why wrong: Splitting the monorepo into multiple repositories and chaining them with submodules reverses the requirement to keep a monorepo, and introduces severe operational friction. Every cross-service change requires committing a new submodule pointer plus the parent reference, making atomic multi-service commits impossible and forcing fragile synchronization between repositories. Sparse checkout solves the same size problem without dismantling the monorepo, which is exactly why the other options are unnecessary and wrong.
- C
Implement Git Virtual File System (GVFS) for the repository and use CI triggers only on the main branch.
Why wrong: GVFS (Git Virtual File System) is an older Microsoft tool that requires a virtual filesystem filter driver and is primarily supported on Windows; Azure Repos does not provide GVFS server support, so it cannot be used with a cloud-hosted Git repository. Even if it were available, restricting CI triggers to only the main branch removes all pre-integration feedback from feature branches, so broken code is only discovered after merging. The correct technique is to use sparse checkout plus path-based triggers, which works natively in Azure Pipelines without proprietary clients.
- D
Use Git sparse checkout to clone only the folders needed for each microservice, and configure path-based CI triggers to run only when files in specific directories change.
Sparse checkout, especially in cone mode, limits the working tree to the specific folders each microservice owns, so each clone and checkout downloads only the files needed for that service. Path-based CI triggers in Azure Pipelines evaluate the changed paths of a commit and run the pipeline only when those paths match the include patterns, preventing a change in one service from triggering builds of every other service. Together they preserve the monorepo's single-history benefits while giving each team a fast checkout and a pipeline that reacts only to its own code.