This is a response to a question asked on the Adafruit discord server, where someone asked
"Hugo what is exactly rebasing, and why people always has nightmare stories about that?"
Rebasing has become a bit overloaded as a term, but in essence, it means taking a given branch and putting its changes "on top of" other changes. That's quite confusing, so I'll explains...
Imagine you're working on a repository with other people. Commits up to now were merged and linear in the "main" branch... c0 - c1 - c2 - c3 - c4
. You start working on a feature, so you create a feature branch off the "main" branch, at commit "c4
". You do work on that branch, and create your local commits. So the tree looks like this:
c0 - c1 - c2 - c3 - c4 - c5 - c6
\ f0 - f1 - f2