Reputation: 409
Is it possible to make pull requests between two different Github repositories? For example, if I have a branch called new-feature
in Repository A, can I create a pull request and merge the changes into the master
branch in Repository B?
Merging across repos is possible in git, but I can't find anything suggesting that Github supports it.
Upvotes: 12
Views: 8257
Reputation: 409
If the repos are in different organizations on GitHub you can fork one and create pull requests cross forks from the GitHub interface.
But if you want to create pull requests between repos from the same organization on GitHub, you can edit the remotes on the original repo (Repository A in your example) and then "send" branches cross GitHub repositories and create the pull requests using GitHub interface.
Check my answer on git fork repo to same organization for more details.
Also, please note that this is only possible if Repository A and Repository B share at least part of commit history, otherwise you will just get a message like:
repositoryA/new-feature
andrepositoryB/master
are entirely different commit histories.
When you try to create the PR.
Upvotes: 4
Reputation: 403
The following would merge the changes of ProjectA with the ProjectB
# go to projectB:
git remote add projectA path/to/projectA/NewFeature
git fetch projectA
git merge projectA/master
Now Push these changes to your github ProjectB repository.
git push origin master
Upvotes: 7