Most developers run git pull dozens of times a week without thinking about it. And most of the time, it works.

Then one day you open a PR and the reviewer says "can you clean up the merge commits?" You look at your branch and see three "Merge branch 'main' into feature/login" commits scattered through history. The feature itself is 5 commits. The log is a mess.

That mess comes from one decision: using git pull instead of git pull --rebase.

Here's what's actually happening, and why the rebase variant produces cleaner history for teams.

The setup: diverged history