refs

merge references

Changed on
post/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}
  • Auth
    • HTTP bearer
    • or HTTP basic
    • or API key in cookie internal_auth_session

Request body

messagestring
metadataobject
strategystring

In case of a merge conflict, this option will force the merge process to automatically favor changes from the dest branch ('dest-wins') or from the source branch('source-wins'). In case no selection is made, the merge process will fail in case of a conflict

forceboolean

Allow merge into a read-only branch or into a branch with the same content

allow_emptyboolean

Allow merge when the branches have the same content

squash_mergeboolean

If set, set only the destination branch as a parent, which "squashes" the merge to appear as a single commit on the destination branch. The source commit is no longer a part of the merge commit; consider adding it to the 'metadata' or 'message' fields. This behaves like a GitHub or GitLab "squash merge", or in Git terms 'git merge --squash; git commit ...'.

Response

merge completed

referencestring required

Changes