Skip to content

Instantly share code, notes, and snippets.

@saml
Created September 16, 2015 19:03
Show Gist options
  • Save saml/61e86595e06d84acc5f2 to your computer and use it in GitHub Desktop.
Save saml/61e86595e06d84acc5f2 to your computer and use it in GitHub Desktop.
Probably you have this:
upstream: A---B---C
origin: A
\
branch: D
You want to go:
upstream: A---B---C
origin: A---B---C
\
branch: D
git checkout master
git pull # origin
git fetch upstream
git rebase upstream/master
git push # your origin/master is same as upstream/master
git checkout branch
git rebase origin/master
git push -f origin branch
make a PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment