📖 Concepts
RebaseRe-applies commits from your current branch on top of another branch. Creates a linear history instead of a merge commit.
Linear HistoryA commit graph with no branching/merging — every commit has one parent. Easier to read and bisect.
Rebase vs MergeMerge preserves the full branch structure. Rebase rewrites commits for a cleaner, linear history. Both produce the same final content.
Understand the situation
Feature branch started from the same base as main, but has different commits. Check the log to see.
● Understand the situation
○ Rebase feature onto main
○ Check the linear history
○ Merge feature into main (fast-forward)