v1

latestOpenAPI 3.0.22026-07-174950145.6 KB
Manage Branches

Update a Branch

Update the ID or the baseRef of a branch. Changing the base reference of a branch performs a "rebase"-operation. Under some circumstances such an operation can take a bit longer than usual, in that case a special response will be sent which contains a token to check the status of the operation. Depending on the content of the branch, there can be conflicts during a "rebase"-operation. In that case the response will be a conflict-response which contains a description of the occurred conflicts. These conflicts then have to be solved in order to continue with the "rebase"-operation.

patch/spaces/{spaceId}/branches/{branchId}

Path parameters

spaceIdstring required

The unique identifier of the space.

branchIdstring required

The unique identifier of the branch.

Request body

idstring

The branch ID. It must be unique per space.

baseRefstring

The reference onto which the branch has been created. A reference describes a target branch and a version within that target branch. References have the following syntax:

[<branchName (optional, default: main)>:][<version (optional, default: HEAD)>]

The "main"-branch is the space itself as it has been created in the first place. Defining the branch as part of the reference only becomes necessary if further branches have been created for the space, which should be addressed by the ref.

Samples:

  • main:42 points to version 42 of the "main"-branch
  • myBranch:37 Points to version 37 of the branch with ID "myBranch"
  • 42 points to version 42 of the "main"-branch
  • myBranch:HEAD points to the latest version of the branch with ID "myBranch"
  • HEAD points to the latest version of the "main"-branch
  • myBranch points to the latest version of the branch with ID "myBranch"

Response

A branch response.

idstring

The branch ID. It must be unique per space.

baseRefstring

The reference onto which the branch has been created. A reference describes a target branch and a version within that target branch. References have the following syntax:

[<branchName (optional, default: main)>:][<version (optional, default: HEAD)>]

The "main"-branch is the space itself as it has been created in the first place. Defining the branch as part of the reference only becomes necessary if further branches have been created for the space, which should be addressed by the ref.

Samples:

  • main:42 points to version 42 of the "main"-branch
  • myBranch:37 Points to version 37 of the branch with ID "myBranch"
  • 42 points to version 42 of the "main"-branch
  • myBranch:HEAD points to the latest version of the branch with ID "myBranch"
  • HEAD points to the latest version of the "main"-branch
  • myBranch points to the latest version of the branch with ID "myBranch"