Rebase vs. Merge

1
The Setup

Imagine your `main` branch has new commits, and your `feature` branch also has new work. Your goal is to integrate the `feature` into `main`.

A
B
main
C
D
feature
Key Point: Both branches share a common ancestor (`A`), but have since diverged. We need to combine the work from commits `C` and `D` with commit `B`.