GitHub API to create a branch

Hello,

Could you please let me know if there is Github API to create a branch for any given repo? If you could find then, could you please help me with the link?

Thanks

Jalees Ahmed Shaik

Hi @jalees

Thank you for being here! In order to create a branch via API, you would have to use the Git Refs API. Creating a new reference takes two parameters. For a branch, the ref should look like refs/heads/[NEW-BRANCH-NAME] and sha should point to a hash from which to branch off.

I hope this helps!