v5

latestSwagger 2.0MIT2026-08-03485217850.7 KB
repository

Update a branch reference to a new commit

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

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