Hanzo
OpenapiGit

Lands a set of files as one commit without a git client — the hanzo.app…

Lands a set of files as one commit without a git client — the hanzo.app builder's push.

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

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

Lands a set of files as one commit without a git client — the hanzo.app builder's push. The repo is CREATED on first push, the files are merged onto the branch tip (unlisted files survive), and the same push-to-deploy hook a real receive-pack fires is fired, so downstream this is indistinguishable from a git push.

Request

8 fields, body application/json (required).

FieldInTypeRequiredDescription
namepathstringyesName is the repo to push into, from the :name path segment.
branchbodystringBranch to advance; empty means "main".
filesbodypushFile[]Files are added to or overwritten on the branch tip — files already there and not listed SURVIVE.
files[].contentbodystringContent is the file's bytes, carried per Encoding.
files[].encodingbodystringEncoding is "base64", or "utf-8" (the default, also "utf8" / "text").
files[].pathbodystringPath is repo-relative.
messagebodystringMessage is the commit message; empty gets a generated one.
namebodystringName is the repo to push into, from the :name path segment.

Response

StatusBodyMeaning
200pushRespok

200 body — 4 fields.

FieldInTypeAlwaysDescription
branchbodystringBranch is the branch that was advanced, resolved (never empty).
cloneUrlbodystringCloneURL is the repo's HTTPS remote.
commitbodystringCommit is the new commit's full hash.
sshUrlbodystringSSHURL is the repo's scp-style SSH remote.

Failure carries the platform error shape — see Errors.

Examples

hanzo git repos push <name>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page