Native tool in Git to gather repository metrics and health data
[git-sizer(1)](https://github.com/github/git-sizer) is an important building block for our support team and customers as it enables them to easily gather metrics about a repository. Furthermore, it provides helpful diagnostics that indicate whether a specific metric may or may not be concerning so that it is easy to tell at a glance how well a repository will likely perform.
It is unfortunate though that git-sizer(1) is not part of Git itself. On the one hand this requires customers to install a separate binary in many cases. On the other hand this also requires us to deploy git-sizer(1) as a separate binary if we want to surface this information via Gitaly, for example.
Microsoft has submitted a proposal to the mailing list to upstream git-survey(1) as a native replacement. As Microsoft currently has different priorities we have agreed that we help them to land this tool upstream.
## Business Reason
Making it possible to easily gather repository metrics allows us to more readily diagnose potential issues with a repository. As such, it is important that Gitaly can provide such diagnostics to make it easy for customers and our support team to surface this information. This should help reduce support load and makes it easier to build a robust platform.
## Exit Criteria
An initial version of git-survey(1) has been accepted into the Git project. This initial version will not yet cover everything that git-sizer(1) knows about. As such, another exit criteria is that we have collaborated with the Gitaly team to figure out which additional requirements exist for git-sizer(1). These requirements should be moved into a follow-up epic.
## Status
<!-- STATUS NOTE START -->
## Status 2025-11-04
:tada: **achievements**:
- The initial repository metrics command (git-repo-structure) has been merged to master via https://gitlab.com/gitlab-org/git/-/commit/a9db6c66f53f3d1230e575eec682e494b363bdc0. With this command we now have a means to surface basic repository metrics natively in Git.
:arrow_forward: **next**:
- Followup tasks will continue in https://gitlab.com/groups/gitlab-org/-/epics/19791.
_Copied from https://gitlab.com/groups/gitlab-org/-/epics/18040#note_2864789273_
<!-- STATUS NOTE END -->
epic