What does the git maintenance command (or Scalar) provide for keeping large repositories fast?

Last updated 6 July 2026

  • git maintenance start schedules background tasks (commit-graph, incremental repack, loose-object cleanup, prefetch, pack-refs) instead of one big gc pause.

  • Scalar (scalar clone or scalar register) enables partial clone, cone-mode sparse checkout, fsmonitor, and scheduled maintenance in one step.

  • The result is faster status, fetch, and log on large repos.

  • https://git-scm.com/docs/git-maintenance
  • https://gitdash.dev/blog/git-maintenance-automatic-performance
  • https://gitperf.com/chapter-12.html
  • https://git-scm.com/docs/scalar/2.47.0
  • https://github.com/microsoft/scalar
  • https://blog.gitbutler.com/git-tips-3-really-large-repositories
  • https://www.grizzlypeaksoftware.com/library/git-performance-optimization-for-large-repositories-dxifo1ab
  • https://git-scm.com/docs/git-maintenance/2.29.0
All Git interview questions