(This is done in SourceTree)
I am trying to make some branches (master/dev, master/demo, master/live) but this cannot be pushed. For example, when I try to push master/demo to master/demo then it gives this error:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master/demo:master/demo
fatal: HttpRequestException encountered.
An error occurred while sending the request.
POST git-receive-pack (206 bytes)
remote: error: cannot lock ref 'refs/heads/master/demo': 'refs/heads/master' exists; cannot create 'refs/heads/master/demo'
Pushing to https://x@bitbucket.org/x/x.git
To https://bitbucket.org/x/x.git
! [remote rejected] master/demo -> master/demo (failed to update ref)
error: failed to push some refs to 'https://x@bitbucket.org/x/x.git'
Completed with errors, see above.