>One day (...) I stumbled upon a beautiful tutorial on git rebase
via this blog post I finally got around to reading: https://nullbuffer.com/2019/11/18/sourcehut_impressions.html
@sir it is a good read 😀 when I came to the section with the ‘git rebase --onto master feature-1 feature-2’ command, I was confused, though. I had not seen this variant with three branches named and so perhaps an extra two sentences to explain what’s going would have helped.
A rebase without onto, like:
rebase feature-1 feature-2
takes all commits that are in feature-2 but not in feature-1, and puts them on top of feature-1.
rebase --onto master feature-1 feature-2
it takes - like before - all commits that are in feature-2 but not in feature-1, but this time it puts them on top of master.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!