Skip to content

Instantly share code, notes, and snippets.

@fj
Created October 23, 2013 18:38
Show Gist options
  • Save fj/7124133 to your computer and use it in GitHub Desktop.
Save fj/7124133 to your computer and use it in GitHub Desktop.
Issues with Git when --preserve-merging and deleting a merge commit.
git rebase -i --preserve-merges X
before:
master, HEAD
v
X---*---*---m1-------------m2---* // rebase to delete spurious merge commit m1
\ / \ /
a1 b1---b2---b3
expected:
master, HEAD
v
X---*---*---a1--------------m2---*
\ /
b1---b2---b3
actual:
master|REBASE-i, HEAD
v
X---*---*---a1-----------(???)
\ /
b1---b2---b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment