Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to merge a pull request in two branches?

I have two branches develop and test. test is behind develop which was created few weeks back.

I have created a pull request for test and my team member merged it. Now I want to push the same change to develop branch. I tried cherry-pick but it didn't work.

Is there anyway, I can pull the same pull request to develop branch?

like image 452
Java Spring Coder Avatar asked Feb 09 '14 09:02

Java Spring Coder


People also ask

Can a pull request have multiple branches?

The short answer is "no" but depending on how the branches are related there may be a way to work things so you're guaranteed not to have conflicts after the first merge.


2 Answers

A pull is nothing more than a fetch followed by a merge.

Hard to say without having more info on your commit tree, but you should be able to git checkout the develop branch, git merge with test (or whatever commit you're trying to merge with), and then git push your local develop branch to the remote repo's develop branch.

like image 187
schumacher574 Avatar answered Sep 20 '22 12:09

schumacher574


As far as I understand, your team member merged test in master when he accepted the pull request.

To now merge it in develop you could simply do, in your local repo

git checkout develop
git merge test
git push origin develop
like image 29
gturri Avatar answered Sep 19 '22 12:09

gturri