📖 Concepts
MergeCombining changes from two branches into one. Git creates a merge commit with two parent commits.
Fast-forward MergeWhen the target branch hasn't diverged, Git simply moves the branch pointer forward — no merge commit needed.
3-Way MergeWhen branches have diverged, Git combines their changes using their common ancestor as a base. This creates a merge commit.
Check current branch
You're on main. The feature branch has one more commit than main.
● Check current branch
○ Merge feature into main
○ Create a new file and commit on main
○ Switch to feature and make a divergent commit
○ Merge feature into main (3-way merge)