0

My repo is hosted in bitbucket, and every time I open a branch and create a PR

$ # current branch: old-branch
$ git checkout -b new-branch
$ ... changes
$ git commit -am commit
$ git push -u origin HEAD

bitbucket will create a PR into the "main" branch, even though my branch diverged from another branch. Can I force bitbucket UI to understand my destination? something like git push -u <--dest old-branch> origin HEAD

I know how to do this from the bitbucket UI. I'm asking about a CLI way to do this

isherwood
  • 58,414
  • 16
  • 114
  • 157
CIsForCookies
  • 12,097
  • 11
  • 59
  • 124
  • How about consulting the documentation? https://support.atlassian.com/bitbucket-cloud/docs/create-a-pull-request/ It tells you what to do (you have to do it at the bitbucket web site). – matt May 10 '22 at 18:02
  • This shows how to modify the destination branch in the UI. This is known, this is how I work usually. I want to skip the manual UI clicking and do it from CLI – CIsForCookies May 10 '22 at 18:04
  • 1
    But your idea of a CLI here is `git`. It knows nothing of Bitbucket or of pull requests; pull requests are not a Git feature at all. Maybe Atlassian puts out its own CLI tool that lets you do this (GitHub does), but that has nothing to do with Git. – matt May 10 '22 at 18:09
  • 2
    Does this answer your question? [Bitbucket: Send a pull request via command line?](https://stackoverflow.com/questions/8721730/bitbucket-send-a-pull-request-via-command-line) – matt May 10 '22 at 18:10

0 Answers0