Skip to content

Instantly share code, notes, and snippets.

@fj
Last active December 26, 2015 08:49
Show Gist options
  • Save fj/7124501 to your computer and use it in GitHub Desktop.
Save fj/7124501 to your computer and use it in GitHub Desktop.
**** Repository: ****
git@github.com:fj/sample-git-rebase-failure-case.git
**** Topological history: ****
* dc90b7e @ 2013-10-23 14:52:08 -0400 » Commit #9, after legitimate merge commit (John Feminella)
| (HEAD, master)
* 97ba1d7 @ 2013-10-23 14:50:53 -0400 » Commit #8, legitimate --no-ff merge commit (John Feminella)
|\
| * 11d8b92 @ 2013-10-23 14:50:38 -0400 » Commit #7, part of an ongoing branch (John Feminella)
| * 957c73a @ 2013-10-23 14:50:16 -0400 » Commit #6, part of an ongoing branch (John Feminella)
| * c6962a2 @ 2013-10-23 14:50:00 -0400 » Commit #5, part of an ongoing branch (John Feminella)
|/
* bbd8966 @ 2013-10-23 14:48:17 -0400 » Commit #4, --no-ff merge that shouldn't have been done (John Feminella)
|\
| * 6b8c765 @ 2013-10-23 14:48:00 -0400 » Commit #3, on isolated branch (John Feminella)
|/
* f6c9456 @ 2013-10-23 14:44:12 -0400 » Commit #2 (John Feminella)
* 2acf8d8 @ 2013-10-23 14:43:56 -0400 » Initial commit (John Feminella)
**** Failure case: ****
git rebase -i --preserve-merges 2acf8d8
// then delete bbd8966 in the interactive rebase
error: Commit 97ba1d761f60b901f56766886da4ed678e56abea is a merge but no -m option was given.
fatal: cherry-pick failed
Could not pick 97ba1d761f60b901f56766886da4ed678e56abea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment