Grab

Taming the monorepo beast: Our journey to a leaner, faster GitLab repo

Sep 16, 2025Nagendra Gangwar
Taming the monorepo beast: Our journey to a leaner, faster GitLab repo
SummaryAI, from the source post

This post details the technical challenges and solutions for optimizing Grab's large Go monorepo. It outlines the scale of the problem, including infrastructure issues like replication lag and developer experience issues like slow clones. The post describes the failure of several standard Git history rewriting tools (git filter-repo, git rebase --onto, patch-based implementation) due to the repository's complexity and scale. The successful solution is a custom, two-phase migration script that reconstructs history by first processing critical tags and LFS objects chronologically in batches, and then processing recent commits. This script addresses memory limits, network usage, and LFS object fetching, enabling a significant reduction in repository size and improvement in performance.

More from the Git Monorepo Optimization trail