Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • I like your post, the git log command is very helpful, although it doesn't actively fix the problem it helps a great deal in pinpointing and verifying what might go wrong.. I also like your cherry pick, I didn't know that trick, however, the cherry-pick doesn't completely solve the problem either, because you can't (as I just discovered) cherry-pick merges. Thus, the command died half way through on my real world example ;( Commented Jul 6, 2017 at 20:35
  • Well, one thing at a time. I think this answers your question as asked, if you've got another question about something you didn't mention before, how about asking that as another question? Commented Jul 6, 2017 at 20:57
  • No doubt about it. You will receive credit where credit is due. In the mean time, there's no harm in striving toward the most universal solution, or do you disagree? also for the sake of people reading this in the future.. I can manually cherry-pick past the merges. I can also rebase and then identify and re-cherry-pick the missing commits using the git log command.. but.. git is smart, and used by so many people, surely there is a command that will do the right thing, and if by pointing that out it sparks an idea of how to solve it, all the better for us and all that come after :) Commented Jul 6, 2017 at 21:28
  • Alright, but the only new thing you mentioned was merges—rebase ignores those, too, were you just looking for git cherry-pick $(git rev-list --no-merges ..A@{1})? Commented Jul 6, 2017 at 21:54
  • hm.. nope, that applies the commits in reverse order. However, trying to recover from the mess that caused, I discovered that you can git cherry-pick --continue when you've resolved an issue, and it continues the cherry-pick.. so with that in mind your original suggestion seems to solve the issue perfectly. It doesn't preserve the branching and merging, however, it does preserve the commits on either side, so all in all exactly like rebase, except for the not dropping commits. So I thank you kindly, and apologize for not recognizing the genious of your solution immediately :) Commented Jul 6, 2017 at 22:27