Rebase takes the commits between the branch and its ancestor, moves them onto a new base, and replays them one by one, creating a new commit for each.
graph LR C1[c1] --> C2[c2] C2 --> C3[c3 main] C1 --> F1[f1] F1 --> F2[f2] F2 --> F3[f3] C3 -.rebase.-> R1[f1] C3 -.rebase.-> R2[f2] R2 --> R3[f3] style C3 fill:#E8F5E9 style R3 fill:#FFF3E0