branch update via API
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=24168) </details> <!--IssueSummary end--> ### Problem to solve I can create, read, and delete branches via the Gitlab API, but I can't update an existing branch. ### Proposal Add a new endpoint, PUT /projects/:id/repository/branches/[urlencoded-branch-name], which accepts { "new" : "sha or branch name", optional "old" : "sha" } If old is present, the branch will only be updated if its current value matches "old" (as per git update-ref). If the branch doesn't exist, it will be created if old is all-zeros or not present.
issue