Monorepo Management with Git
Intermediate · 35 minutes · 100 points
Learn how to structure, manage, and work efficiently within a Git monorepo. You will create a monorepo containing multiple projects, configure Git features like sparse checkout and subtree, manage cross-project changes with atomic commits, and use Git hooks to enforce monorepo conventions. This lab builds foundational skills for working in large codebases where multiple services or packages live in a single repository.
What you’ll learn
- Initialize a Git monorepo with a structured multi-project layout
- Use Git subtree to integrate an external project into the monorepo
- Configure sparse checkout to work with only a subset of the monorepo
- Create and enforce a Git commit-msg hook to validate monorepo commit conventions
How this lab works
- Start the lab: One click starts a container on your computer with a real terminal: nothing to install by hand, nothing to clean up.
- Work through 4 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work runs each task’s checks in your container and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: A container on your computer, with a real terminal
- Image: ubuntu:22.04
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
Topics: git, monorepo, subtree, sparse-checkout, git-hooks, devops, repository-management
Create a free account to start this lab.