Skip to content

Instantly share code, notes, and snippets.

@bryanrite
Last active January 4, 2016 17:39
Show Gist options
  • Save bryanrite/8655871 to your computer and use it in GitHub Desktop.
Save bryanrite/8655871 to your computer and use it in GitHub Desktop.
Upstream Pull-Requests into My fork.
# You have forked a project but someone has submitted a nice looking pull-request
# to the upstream project that you want for your fork.
# Setup upstream repo
git remote add upstream https://github.com/whatever/repo.git
# Get the desired pull-request from upstream
git fetch upstream pull/<PR-ID>/head:pr-<PR-ID>
# Rebase pull-request on your master
git checkout pr-<PR-ID>
git rebase master
# Fix any conflicts
# Merge
git checkout master
git merge pr-<PR-ID>
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment