Starting with
hack---F1----M1----F2 (feature)
/ /
C1-----C2----C3 (master)
I would like to end up with
Looking at your original workflow, it seems like you want to ignore merges, the only problem is using -i
for an interactive rebase, which preserves merges.
git checkout -b temp
git rebase --onto master hack temp
* Big drawback is gone!
git checkout master
git merge temp
git branch -d temp
Should work exactly how you want. This probably doesn't exactly solve your "general case," though.