You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to ability to List branches which shows branch name and commit details, let's have Create branch, to have better feature parity with industry standard.
This is pretty-much request equal to issue #8209 but instead of focusing on tags, this focuses on branches.
Describe the solution you'd like
New API endpoint POST /api/v1/repos/{owner}/{repo}/branches with payload of tag's name (string) and commit's hash (string)
Describe alternatives you've considered
Cloning repository, and using CLI to do those actions locally, then push them to remote.
Works, but introduces need to execute bash commands on backend server, which is always security concern. Having official API for this will make me sleep better at night 😅
Additional context
Before creating PR for this, I will wait for maintaner response on issue regarding similar feature for tags ( #8209 ) and relevant pull request ( #8212 )
Since solutions will be almost identical, best to first merge tags, and then copy the solution to branches.
Code of Conduct
I agree to follow this project's Code of Conduct
Reacted by Matej Bačo, Harsh Mahajan, Levi van Noort, Simon Moses Onazi, Aishwari Pahwa, Chirag Aggarwal, ArnabChatterjee20k, premtsd-code, Chen Parnasa, Rahul Raghunathan and 5 more
This is implemented in #8566: POST /repos/{owner}/{repo}/branches with {"name": "...", "target": "..."}, where target is a branch, tag or commit SHA and defaults to the default branch. It will ship in 0.15.
Activity
unknwon commentedon Nov 15, 2026
This is implemented in #8566:
POST /repos/{owner}/{repo}/brancheswith{"name": "...", "target": "..."}, wheretargetis a branch, tag or commit SHA and defaults to the default branch. It will ship in 0.15.