Line At A Time
Level 1: Squash a Feature
Squash a Feature Land a messy branch as one tidy commit with merge --squash.

On a real feature branch, commits pile up: "feat: start the robot", "fix: robot arm falls off", "fix: arm falls off AGAIN". That's healthy while you work (commit early, commit often!), but main's history doesn't need the whole diary; it reads best as one commit per finished feature.

A squash merge does exactly that: git merge --squash feature gathers everything the branch did into one set of staged changes, and then YOU commit it, as a single clean commit whose message sums up the feature. (The "Squash and merge" button on GitHub pull requests does exactly this.)

Look closely at the goal picture: main gets ONE new commit and no merge commit. The feature branch keeps its messy diary off to the side; nothing on it is lost.

git merge --squash <name>Stages everything the branch did as one change; nothing is committed yet.
git commit -m "feat: ..."Seals the whole feature as a single tidy commit on main.
Your task

Land a messy branch as one tidy commit with merge --squash.

Open this level in your browser to type the commands at a live git prompt with an animated commit graph.