Skip to content

Instantly share code, notes, and snippets.

@obscuren
Last active March 23, 2016 13:32
Show Gist options
  • Save obscuren/b719b47d9f6966a8d159 to your computer and use it in GitHub Desktop.
Save obscuren/b719b47d9f6966a8d159 to your computer and use it in GitHub Desktop.

Good!

A - B - C - D     <develop>
             \
              E - F - G     <PR1>
                       \
                        H - I - J     <PR2>

Diverged!

A - B - C - D     <develop>
             \
              E - F - G     <PR1>
	               
              E' - F' - G' - H - I - J     <PR2>

Want to get rid of E', F', G', they are out of date.

git rebase --onto <new base> <old base>. We want to rebase using new base PR1 and keep H, I, J (H~4): git rebase --onto P1 HEAD~4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment