👁️ CHAPTER 4 · GIT FETCH
Chef You

Peek Without
Touching

git fetch downloads new data from the remote — but doesn't touch your working files. It's like looking at the library menu without ordering anything.

Scene I

Fetch vs Pull

Chef You

git pull = git fetch + git merge

Pull does everything at once. Fetch gives you control — you can see what changed before merging.

After fetch, new commits live in origin/main (a tracking branch) — your local main is untouched until you explicitly merge.

👁️ FETCH OPERATION Step 1: Fetch to see what's new
☁️ REMOTE (origin)
fetch
📡 ORIGIN/MAIN (tracking)
🏠 LOCAL MAIN
Synced!

🎉 Fetched, reviewed, merged

You fetched first, saw what was coming, then merged on your own terms. That's the safest workflow:

git fetch → review → git merge

$ git fetch origin
remote: Enumerating objects: 6, done.
$ git log origin/main --oneline
f9a3c21 Update plating
$ git merge origin/main
Fast-forward ✓
Epilogue
Fetch is cautious.
Look before you leap.
Merge when you're ready.
git fetch
Download only
Safe, controlled
+
git merge
Apply changes
When ready
=
git pull
All at once
Convenient