Fast-Forward & 3-Way Merge


git merge yourBranch

Fast-Forward merge

When the master branch has no new commits, Git simply moves the master pointer forward to the latest feature commit without creating a new merge commit.

A-BCD

3-way merge

When both branches have evolved independently, Git combines their histories by generating a brand new “merge commit.”

mfaesatteurreABDCEFG

Squash Merge

Git condenses all feature branch commits into a single new commit on the master branch, keeping the main repository history completely linear.

mfaesatteurreABDCEFS

Git Merge Conflicts