This question is in reference to Atlassian Documentation: repository Resource
Is there a way to create a branch in a Bitbucket cloud repository using the REST API? There's a button on the Web UI to do so.. I know I can use git itself to create and push a branch, just wondering if I can do it in our build process without cloning the repo locally first.
it's not the official API docs but I traced the web call from the frontend but this works
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -vv -u '$USERNAME:$PASS' "https://bitbucket.org/branch/create" -s -d 'repository=$TEAMORUSER%2F$REPO&from_branch=master&branch_name=staging'
Didn't have any luck with that:
'from_branch' is not recognized as an internal or external command, operable program or batch file. 'branch_name' is not recognized as an internal or external command, operable program or batch file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.