expectedHeadSha),
repo.createCommit().send() throws a RefUpdateError containing the status, reason, and ref
details.
Builder Methods
Options
Mirrors the
base_branch metadata field. Point to an existing branch whose tip should seed
targetBranch if it does not exist. When bootstrapping a new branch, omit expectedHeadSha so
the service copies from baseBranch; if both fields are provided and the branch already exists,
the expectedHeadSha guard still applies.Store the branch under the
refs/namespaces/ephemeral/... namespace. When enabled, the commit is
kept out of the primary Git remotes (for example, GitHub) but remains available through storage
APIs.Use alongside
baseBranch when the seed branch also lives in the ephemeral namespace. Requires
baseBranch to be set.Ordered ref policy rules (
{ pattern, ops? }) in the JWT for this call. Code Storage uses the first rule that matches the target ref. Python: ref_policies. Go: RefPolicies with type storage.RefPolicyList. See Ref Policies.Response
Streaming Large Files
Use streams or async generators to upload large files without loading them into memory:Response
Thesend() method returns the following: