Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to create a pull request from branch in repo1 to branch in repo2 in the same project?

Tobias Andersen June 8, 2021

I have a project called "projectname" with 2 repos: "repo1" and "repo2".

I have both repos open in Sourcetree and i can push and pull with IntelliJ without issues.

I want to make a pull-request from a branch in repo1 to a branch in repo2.

I expected to see both "projectname/repo1" and "projectname/repo2" in the "Source" and "Destination" dropdowns in the "Create pull request" page, but i can only see one.

If i visit the "Create pull request" page in repo1 i only see "projectname/repo1" in the dropdownw.

If i visit the "Create pull request" page in repo2 i only see "projectname/repo2" in the dropdowns.

Why can i not see both?

Why do i only get to see one repo from "projectname" at a time?
The "No more repositories" error is incorrect.

Please advice.

Thanks for reading.

Screenshot_1094.png

1 answer

1 accepted

0 votes
Answer accepted
Tobias Andersen June 8, 2021

Nvm. figured out how to do it using Sourcetree.

I had both repos open in Sourcetree, repo1 in tab1 and repo2 in tab2 of Sourectree.

Screenshot_1098.png

While in tab1 (repo1) i went "Repository" --> "Add remote..." --> added both repo1 and repo2.

While in tab2 (repo2) i went "Repository" --> "Add remote..." --> added both repo1 and repo2.

Then i checked that the settings were correct using "Fetch" and checked the "Fetch from all remotes" in both tab1 (repo1) and tab2 (repo2).
Screenshot_1099.png

Then, while in tab1 (repo1) where the branch i wanted to use as "Source" was, i used the "Repository" --> "Create pull request..." and used repo2 as "Submit via remote", the branch i wanted to use as "Source" in "Local branch" and the new branch in repo2 as "Remote branch" like this:
Screenshot_1097.png

And then i could make a PR in Bitbucket like this:
Screenshot_1100.png

 

Can we get an official guide on how to do this, if this is how you are supposed to create pull-requests between repos in the same project? 🤓

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events