Branches

Merge a commit into a branch

Merge a client commit into a branch during push. Returns merge commit on success, or original server commit if conflicts occur.

post/api/repos/{namespace}/{repo_name}/branches/{branch_name}/merge

Request

Path parameters

namespacestring required

Namespace of the repository

repo_namestring required

Name of the repository

branch_namestring required

Name of the branch to merge into (the target branch)

Request body

client_commit_idstring required
server_commit_idstring required

Response

Merge successful or merge conflicts encountered. Returns the new head commit.

oxen_versionstring nullable
statusstring required
status_messagestring required

Example response

{
  "commit": {
    "author": "ox",
    "email": "ox@example.com",
    "id": "a1b2c3d4e5f67890abcdef1234567890",
    "message": "Refactor data loading pipeline.",
    "parent_ids": [
      "f1e2d3c4b5a67890fedcba9876543210"
    ],
    "timestamp": "2025-01-01T10:00:00Z"
  },
  "status": "success",
  "status_message": "resource_found"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.