repository

Update a branch reference to a new commit

Changed on
put/repos/{owner}/{repo}/branches/{branch}

Request

Path parameters

ownerstring required

owner of the repo

repostring required

name of the repo

branchstring required

name of the branch

Request body

forceboolean

Force update even if the change is not a fast-forward

new_commit_idstring required

New commit SHA (or any ref) the branch should point to

old_commit_idstring

Expected old commit SHA of the branch; if provided it must match the current tip

Response

APIEmpty is an empty response

Changes

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      endpoint added