Skip to content

Instantly share code, notes, and snippets.

@Crydust
Last active April 4, 2018 09:18
Show Gist options
  • Save Crydust/d660b4bf800c4e85ac1f to your computer and use it in GitHub Desktop.
Save Crydust/d660b4bf800c4e85ac1f to your computer and use it in GitHub Desktop.
advaced rebase with git
move onto newbase
the commits after upstream
upto and including branch
git rebase --onto newbase upstream branch
from:
n-u-b
to:
n-u
`-b
before:
A---B---C---D newbase
\
E---F---G upstream
\
H---I---J branch
after:
A---B---C---D newbase
|\
| E---F---G upstream
\
H'--I'--J' branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment