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.

5
  • "periodically re-pulled from dev branch"... rebased or merged? Commented Aug 17, 2022 at 2:00
  • The fact that you don't see the merge commits is half the problem. You need to add --preserve-merges to your rebase -i command. The rebase will end up being a lot more complicated, but it will be more complicated in a good cause. Commented Aug 17, 2022 at 2:19
  • "But, with these merge commits, it seems that every git rebase -i xxxxxxx that I try is reporting a ton of previously resolved merge conflicts. " this is what git rerere is for, you can light it retroactively. Commented Aug 17, 2022 at 2:19
  • 1
    @Phil “‘periodically re-pulled from dev branch’... rebased or merged?” ... they apparently merged rather than rebasing, as requested. Commented Aug 17, 2022 at 2:39
  • As eftshift0 answered, this particular Gordian Knot is best cut rather than carefully untied. If you wish to untie it anyway for some reason, the key will be to find some exclusionary commit hash ID (or name) that keeps away most of the unwanted commits, and using --onto to give you a different name. If you can't programmatically exclude all the commits, use git rebase -i and drop from the rebase all the to-be-excluded commits (this is painful). Commented Aug 17, 2022 at 9:20