Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I specify another repository for pull request in BitBucket?

I want to pull changes from my repo to team one. Since my repo was created first, team one was created via import. Unfortunately, BitBucket won't allow me to create PR to it (dropdown for target repository is my own repo only).

Why can't I specify another repository? Must I fork it, for PRs to work? After all, git root and commit history is the same and valid PR requires source repo/branch and target repo/branch?

Atlassian docs on PR state:

you need to provide 4 pieces of information to file a pull request: the source repository, the source branch, the destination repository, and the destination branch.

So no mention of remote info being necessary, no mention of eligible repositories for pull request destination.

Furthermore:

Pull requests can also be used to collaborate with other developers outside of the official project. For example, if a developer was working on a feature with a teammate, they could file a pull request using the teammate’s Bitbucket repository for the destination instead of the official project. They would then use the same feature branch for the source and destination branches.

That would mean I should be able to request pulling my changes to teammate repository. Is there some secret info passed around when you fork a repository, that's not passed around when you copy/paste it or clone it from scratch? I mean, only remotes come to mind, but setting remotes when making a PR ain't that hard.

Atlassian docs I consulted:

  • https://www.atlassian.com/git/tutorials/making-a-pull-request
  • https://confluence.atlassian.com/display/BITBUCKET/Work+with+pull+requests
like image 292
LAFK says Reinstate Monica Avatar asked Apr 14 '15 17:04

LAFK says Reinstate Monica


People also ask

How do I change the destination of a pull request in Bitbucket?

Go to the pull request and click the ellipsis button and select Edit. From here you can change the target branch for the pr. As Mikael has said, creating and editing pull requests in Bitbucket Cloud use the same form. This allows you to edit the destination branch.

How do I give permission to a Bitbucket repository?

Go to Settings > Permissions for the repository. Click in the Add Users or Add Groups fields in the relevant section to search for, and bulk add, users or groups. Choose a permission from the drop-down list, then click Add.

How do you raise a pull request from one branch to another?

As of 15.08. 2016 GitHub allows changing the target branch of a pull request via the GUI. Click Edit next to the title, then select the branch from the dropdown. You can now change the base branch of an open pull request.


1 Answers

Yes, you must fork from it from the central destination repository.

Cloning the origin, renaming the clone to "upstream" and then pushing to your own origin repo from which you would like to make a pull request to the upstream, won't work.

like image 114
melvinv Avatar answered Oct 26 '22 03:10

melvinv