Back to all use cases

AssessmentSoftware / Digital Platforms

Most of a slow clone is objects nobody asked for, and Git can be told to leave them out

Engineering Productivity Team

A typical engagement for a team whose main repository has grown until clones take many minutes: find what makes it large, set up partial clone, shallow clones and sparse checkout for CI and developers, schedule git maintenance, and plan any history clean-up.

Git consulting

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

  1. Lists the largest objects in history with their paths and the commit that added them
  2. Counts branches, tags and other refs and finds the ones that can be retired
  3. Times clone, fetch and checkout from a CI runner and a laptop before any change
  4. Tests partial clone with a blob filter, shallow clones for CI and sparse checkout for teams that need one directory
  5. Plans git maintenance for developer machines and build servers, with its commit-graph, prefetch and repack tasks
  6. 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.

Technologies

Git (version control)GitLabJenkins

Ready for a Git (version control) Health Check?

AceMQ's senior Git (version control) engineers have handled this exact type of engagement before. Whether you need architectural guidance, hands-on remediation, or an ongoing managed partnership, we're ready to help.