Skip to content

Instantly share code, notes, and snippets.

@offby1
Created September 12, 2009 00:15
Show Gist options
  • Select an option

  • Save offby1/185666 to your computer and use it in GitHub Desktop.

Select an option

Save offby1/185666 to your computer and use it in GitHub Desktop.
So I've got commits that look like this:
A---B1--B2--B3--B4--B5--C1--C2--C3--C4--C5 ...
And I want them to look like this:
C'1--C'2--C'3--C'4
/
A---B'1--B'2--B'3--B'4
... sort of the reverse of a rebase. I can certainly do it with something like
$ git checkout A
$ git format-patch B..C
$ git am -3 *.patch
$ git branch -D C
$ git branch C
... but surely there's a better way?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment