9

My situation is as follows: - I have a fork of an opensource github project. - I do all of my development in my forked repo in branches from the develop branch - There is an unmerged pull request I need in the main repo's develop branch - To test the unmerged pull request I created a new directory and cloned origin to it then fetched the unmerged request to the main - Now that I've tested the unmerged pull request, i need to merge the pull request with my fork of develop.

What steps will allow me to merge the pull request into my local fork?

1 Answer 1

23
~/your-repo $ git remote add pr-source https://github.com/<user-providing-pull-request>/<repo-name>

~/your-repo $ git fetch pr-source

~/your-repo $ git merge pr-source/<pull-request-branch-name>

Note that:

  • you don't need the main repo, either from github or cloned locally
  • you don't need a clone of the repo providing the pull request, you just need it as a remote
  • you don't have to call it pr-source, I was just using that as "pull request source"
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.