0 votes
1 view
in Devops and Agile by (25.5k points)

A project on GitHub that I have a fork of has a new pull request that I want to pull into my fork that the author has not pulled in yet.

Is there a simple way to apply pull requests from other forks into my fork? Is there something else here that I am missing?

1 Answer

0 votes
by (42.7k points)

For this, you can do it manually 

Add a fork as your new remote repository using:

git remote add otherfork git://github.com/request-author/project.git

Then you need to fetch the remote

git fetch otherfork

For pull, you have 2 options: 

One, you can rebase the branch on which your pull request is formed. But this will ignore the eventual commits between origin and pull request. 

git rebase master otherfork/pull-request-branch

Or if you need all the commits in the pull request, then find SHA -1

And use cherry-pick

git cherry-pick <first-SHA> <second SHA>

Thus, you can unmerge upstream pull requests from other forks to your forks.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...