I'm new to git rebase and doing something a bit wacky and stupid.
So let's say I have these commits which all modify the same file file.txt
a -> b -> c -> d -> e
I want to just remove commit c
.
My strategy for this is to rebase b
onto d
, keeping d
's changes so it reads like this
a -> b -> d -> e
I'm trying to do this with this command
git rebase --rebase-merges --onto c^ c
This results in a failed merge, I've also tried it with -s ours
but that fails as well.
This works when each commit modifies a different file, however.
What should I do to satisfy this goal?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…