Gitlab hero border pattern left svg Gitlab hero border pattern right svg

Product Direction - Monorepos


Monolithic repositories, more commonly known as monorepos, are a software development approach where code for many projects is stored in a single repository.

Monorepos provide a number of advantages such as reduced complexity, code reuse, easier collaboration amongst teams, and streamlined dependency management. Additionally, there are several drawbacks such as difficult to scale, performance concerns, requires large amounts of storage, and loss of per-service semantic versioning.

View our Monorepo Issues List

When to use a monorepo

As noted before, monorepos offer some great advantages. Here are some examples when a monorepo is a great choice:

  1. Cross container (microservices) shared library code that is direct copied into containers
  2. Development of test automation frameworks using CLI tooling

When not to use a monorepo

  1. Microservice application with multiple dependencies that must be coordinated
  2. Mutli-project pipelines are employed for separation of duties, testing, or other requirement

Existing monorepo experience inside of GitLab

We want to improve the monorepo experience - whether it has multiple services that all get deployed together, or if it's a mobile app in a single repo that needs to be built completely differently for iOS and Android.

The primary stages that will be supporting our development of a better monorepo experience are:

Secondary stages contributing to the betterment of monorepos in GitLab are:

GitLab already has a number of important features that help monorepos:

What's next & why

The primary way for us to improve the monorepo experience is by focusing on the performance of large files inside of repositories and streamlining the CI pipeline for them. We're currently working on the following two initiatives to help with both of those features:

Check out our Verify:Testing group's ThinkBig about testing in Monorepos:

Top Vision Items

We are looking at adding native experiences in GitLab such as using AutoDevops to build and deploy to multiple containers in a monorepo. This type of functionality would be a game-changer for large monorepos looking to use Auto DevOps. Enabling users managing large repositories using mutliple containers per repository with CI templates, solves some of the top challenges that are facing organizations adopting DevOps and using monorepos.

Competitive landscape

GitHub has released a Remote Repository Plug-in to better meet the developer needs around monorepo experiences. This extension enables users to quickly commit to GitHub directly from Visual Studio. This empowers users to easily navigate some of the git complexities that come with monorepos.

Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license