Overview
This is a typical engagement for an engineering productivity team whose main repository holds years of history and some committed binaries. Every CI job clones it in full, developers wait on fresh clones and fetches, and the Git server's load rises when the pipelines start. AceMQ and a partner Git specialist measure where the size comes from and write the changes in order of effort.
Challenge
A repository is slow for a few separate reasons that need different fixes: large blobs in history, a large working tree that most people need only part of, many refs, and pack files that nobody has maintained. Rewriting history fixes the first but changes every commit ID, so it needs a coordinated plan, while partial clone and sparse checkout change nothing on the server's history.
Environment
A self-managed Git server, a few thousand branches and tags, a repository tens of gigabytes in size, a CI system whose jobs clone with default settings, and developers on laptops and a few build servers.
Approach
AceMQ lists the largest objects and the paths they belong to, counts refs, and times a clone, a fetch and a checkout from a CI runner and from a laptop. It then tries partial clone with a blob filter, shallow clones and sparse checkout on a copy, and measures each. Git's own maintenance command is evaluated for the developer machines and the build servers.
Solution
- Lists the largest objects in history with their paths and the commit that added them
- Counts branches, tags and other refs and finds the ones that can be retired
- Times clone, fetch and checkout from a CI runner and a laptop before any change
- Tests partial clone with a blob filter, shallow clones for CI and sparse checkout for teams that need one directory
- Plans git maintenance for developer machines and build servers, with its commit-graph, prefetch and repack tasks
- If the size is committed binaries, writes the options: Git LFS going forward, or a history rewrite with its consequences and a cut-over plan
Outcome
The engagement delivers a size report by path and object, measured timings before and after each option, recommended CI clone settings, a maintenance setup for developer machines and build servers, and a written decision on history clean-up with its costs. The team chooses with numbers instead of guessing.