Reference
Reset branch
Makes the branch's files what they were at a commit, as one new commit.
POST
The history stays: the new commit is on top of the head. The commit may be from any branch of the namespace.
bearerheader
AuthorizationBearer <token>namespace*stringA namespace of your organization, such as prod/app, or <org>:<namespace> for a public namespace of another one. Encode / as %2F.
branch*stringA branch, such as main or agents/fix-1. Encode / as %2F.
application/json- body
to*stringThe commit whose files the branch should have.
Match
^[0-9a-f]{64}$message?stringLength
1 <= length <= 10000The files already match, so no commit was made.
application/json- response
head*stringThe branch's head after the call.
changed*booleanFalse when every change matched what was already there. Then no commit is made and head is the current one.
curl -X POST 'https://example.com/v1/namespaces/string/branches/string/reset' \ -H 'Content-Type: application/json' \ -d '{ "to": "string"}'Example Response
{ "head": "string", "changed": true}