git-toprepo - Monorepo when your company won't let you

git-toprepo combines git-submodules on server side and a monorepo client side. By using Gerrit's submodule tracking, the projects are kept separate on the server while the developers experience the ease of git in a single (mono) repository.

On the client side, users can make a single commit over multiple projects and perform cross project git-rebase, git-merge and git-bisect. In Gerrit, the developers review and submit cross-project changes using topics.

Compared to a regular monorepo, submodule projects can have individual access control and the history of removed submodules can be ignored. The downside is that the commit ids of the monorepo, which only lives on the client side, are not reflected server side.

git-toprepo can be thought of as an ergonomic client side only version of git-subtree and it works well together with Gerrit and Zuul CI.

Fredrik Medley