Fetch: Look, Don't Touch
git fetch origin
git log --oneline origin/master -2
git log --oneline master -2
origin/master genuinely moved to the new commit. Local master — and the actual working directory — are completely untouched.
Pull: Now Actually Catch Up
Since local master had made no commits of its own, this is a genuine fast-forward: local master's pointer simply advances to match origin/master, no merge commit needed.
When Fetch Alone Is the Safer Move
Fetching first, then inspecting origin/master before deciding to merge, is genuinely safer whenever you are mid-way through something uncommitted, or when the incoming change is large enough that you want to review it before it touches your working directory. Pull collapses that inspection window into a single step — fine most of the time, risky the moment you actually needed to look first.
While you were mapping out the project, a real contributor pushed a genuine new commit straight to master. This is the real, everyday shape of team collaboration: work happens whether or not you are watching.
git fetch is the safe, look-first move — it downloads the new commit and updates origin/master, and genuinely nothing else. git pull goes one step further, actually merging (or, as here, fast-forwarding) that new commit into your own branch. Doing them separately, once, makes the real boundary between the two unmistakable.
Fast-forward
When the current branch has made no commits of its own since diverging, "merging" in new commits is genuinely just moving the branch pointer forward — no merge commit is needed, since there is nothing to combine. Confirmed directly in this lab: git pull reported "Fast-forward", not a merge.
Takeaways
- git fetch genuinely updates only remote-tracking references — your branch and working directory are untouched
- git pull performs fetch, then actually integrates the result — here, a clean fast-forward since local master had no commits of its own
- A fast-forward needs no merge commit — the branch pointer simply advances, since there is nothing to combine
- Fetching first is a real, low-cost habit whenever you might not be ready to integrate whatever landed