Skip to content
Back to library
intermediateMerging & Rebasing

Merge

The Definition

Merging combines the history of two branches by creating a new merge commit with two parents.

Mental Model

"A merge is like merging two rivers - the waters (commits) from both rivers flow together into one. Git creates a special commit that points to both source branches."

Visual Simulation

Live Engine
BaseMMERGE

Watch Out (Common Pitfalls)

!

Not understanding fast-forward merges vs regular merges

!

Creating unnecessary merge commits

!

Not resolving merge conflicts properly

Hands-on Command

shell
~ $git merge feature-branch