Hanzo
CLIGit

Git

40 `hanzo` commands for Git, each calling one operation on api.hanzo.ai.

Package git is Git hosting for your org: create repos, clone, push, and see what they cost.

40 commands · API reference →

CommandCallsWhat it does
hanzo git org project git-receive-pack <org> <project> <repo>POST /v1/git/{org}/{project}/{repo}/git-receive-packAccept a push, and turn it into a build
hanzo git org project git-upload-pack <org> <project> <repo>POST /v1/git/{org}/{project}/{repo}/git-upload-packServe a clone or fetch
hanzo git org project info refs <org> <project> <repo>GET /v1/git/{org}/{project}/{repo}/info/refsAdvertise a repository's refs to a git client
hanzo git org git-receive-pack <org> <repo>POST /v1/git/{org}/{repo}/git-receive-packAccept a push, and turn it into a build
hanzo git org git-upload-pack <org> <repo>POST /v1/git/{org}/{repo}/git-upload-packServe a clone or fetch
hanzo git org info refs <org> <repo>GET /v1/git/{org}/{repo}/info/refsAdvertise a repository's refs to a git client
hanzo git keys rm <id>DELETE /v1/git/keys/{id}Removes a registered SSH key, scoped to the caller's org: an org can only delete its own, and a key id it does not own…
hanzo git keys listGET /v1/git/keysReturns the SSH public keys registered to the caller's org — the keys that authenticate `git clone…
hanzo git keys createPOST /v1/git/keysRegisters an SSH public key so it can authenticate git clone git@&lt;host&gt;:&lt;org&gt;/&lt;repo&gt;.git for the caller's org.
hanzo git repos blob <name>GET /v1/git/repos/{name}/blobReturns one file's bytes at one revision.
hanzo git repos commits <name>GET /v1/git/repos/{name}/commitsWalks a ref's history newest first, or one path's history when a path is given.
hanzo git repos files <name>GET /v1/git/repos/{name}/filesReturns every file a glob selects at one revision, WITH its bytes and the revision they came from.
hanzo git repos gc <name>POST /v1/git/repos/{name}/gcRepacks a repo into one bitmapped pack and rewrites its commit-graph, so the next clone reuses the bitmap instead of…
hanzo git repos mirror <name>POST /v1/git/repos/{name}/mirrorImports an external git repository into the caller's repo, provisioning it on first use.
hanzo git repos mirrors rm <name> <id>DELETE /v1/git/repos/{name}/mirrors/{id}Removes one outbound mirror target; later pushes stop being forwarded to it.
hanzo git repos mirrors list <name>GET /v1/git/repos/{name}/mirrorsReturns a repo's outbound mirror targets — the downstream remotes the mirror reactor pushes to whenever a push lands…
hanzo git repos mirrors create <name>POST /v1/git/repos/{name}/mirrorsRegisters a downstream remote the repo's advanced refs are pushed to whenever a push lands here.
hanzo git repos pulls merge <name> 1POST /v1/git/repos/{name}/pulls/{number}/mergeMerges an open pull request by FAST-FORWARDING base to head, and answers the proposal in its merged state with the…
hanzo git repos pulls get <name> 1GET /v1/git/repos/{name}/pulls/{number}Returns one pull request by its per-repo number.
hanzo git repos pulls list <name>GET /v1/git/repos/{name}/pullsReturns a repo's pull requests, newest number first — what is waiting to be reviewed, and what has already landed.
hanzo git repos pulls create <name>POST /v1/git/repos/{name}/pullsProposes a branch for merging and returns it with its number.
hanzo git repos push <name>POST /v1/git/repos/{name}/pushLands a set of files as one commit without a git client — the hanzo.app builder's push.
hanzo git repos readme <name>GET /v1/git/repos/{name}/readmeReturns the README at the tree root as plain text — unrendered, so the caller decides how to present it.
hanzo git repos refs <name>GET /v1/git/repos/{name}/refsLists a repo's branches, tags and default branch — what a branch picker needs in one call.
hanzo git repos subscriptions rm <name> <id>DELETE /v1/git/repos/{name}/subscriptions/{id}Removes one Slack subscription from a repo; the notifier stops posting that repo's events to that channel.
hanzo git repos subscriptions list <name>GET /v1/git/repos/{name}/subscriptionsReturns a repo's Slack subscriptions — which channels the lifecycle notifier posts this repo's push and deploy events…
hanzo git repos subscriptions create <name>POST /v1/git/repos/{name}/subscriptionsBinds a Slack channel to a repo, so the lifecycle notifier posts that repo's push and deploy events there.
hanzo git repos tree <name>GET /v1/git/repos/{name}/treeLists the immediate children of one directory at one revision, directories before files.
hanzo git repos get <name>GET /v1/git/repos/{name}Returns one repo with its live ref state: every branch name and the resolved HEAD commit.
hanzo git repos update <name>PATCH /v1/git/repos/{name}Flips a repo's public bit, the one mutable repo setting today.
hanzo git repos rm <name>DELETE /v1/git/repos/{name}Removes a repo's metadata and purges its storage.
hanzo git repos listGET /v1/git/reposReturns the repos in the caller's scope, most recently updated first.
hanzo git repos createPOST /v1/git/reposProvisions an empty bare repository in the caller's scope and returns it with its clone URLs.
hanzo git usageGET /v1/git/usageReturns per-repo and total storage bytes for the caller's org — the queryable, per-tenant number commerce and o11y…
hanzo git webhookPOST /v1/git/webhookRetired — forge pushes build via platform.hanzo.ai
hanzo git zap createRepoPOST /v1/git/zap/createRepoCreate a repository over the ZAP transport
hanzo git zap deleteRepoPOST /v1/git/zap/deleteRepoDelete a repository over the ZAP transport
hanzo git zap getRepoPOST /v1/git/zap/getRepoRead one repository over the ZAP transport
hanzo git zap listReposPOST /v1/git/zap/listReposList your repositories over the ZAP transport
hanzo git zap usagePOST /v1/git/zap/usageReport your org's git storage footprint over the ZAP transport

How is this guide?