Hanzo
OpenapiGit

Repacks a repo into one bitmapped pack and rewrites its commit-graph, so the…

Repacks a repo into one bitmapped pack and rewrites its commit-graph, so the next clone reuses the bitmap instead of walking the whole object graph.

POST /v1/git/repos/{name}/gc

Addresshttps://api.hanzo.ai/v1/git/repos/{name}/gc
MethodPOST
Operationpost_git_repos_by_name_gc
AuthAuthorization: Bearer $HANZO_API_KEY

Repacks a repo into one bitmapped pack and rewrites its commit-graph, so the next clone reuses the bitmap instead of walking the whole object graph. Idempotent, and safe to interrupt — git swaps both artifacts atomically. It runs under one pack slot with the same memory bounds as a clone, so it can block behind heavy pack traffic rather than compete with it. Storage usage is re-measured afterwards, since a repack reclaims space.

Request

1 field.

FieldInTypeRequiredDescription
namepathstringyesName is the repo's org-unique handle, from the :name path segment.

Response

StatusBodyMeaning
200gcOutok

200 body — 3 fields.

FieldInTypeAlwaysDescription
maintainedbodybooleanMaintained is always true; the call fails rather than reporting false.
repobodystringRepo is the repo that was repacked.
sizeBytesbodyintegerSizeBytes is the size measured AFTER the repack — usually smaller, since repacking drops the packs it supersedes.

Failure carries the platform error shape — see Errors.

Examples

hanzo git repos gc <name>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page