Seems like it’s missing from the “Repos” docs for v1, v2, and v3…how do I create a branch using the Github API?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The V3 API mentions branches in its reference page
Create a Reference
Parameters
So it should be possible to create a new branch, by naming a new ‘
/heads‘ in the ref parameter.Potherca points out to a working test, using the service of
www.hurl.it(which makes HTTP requests)In 2022, you can also use gh api