Fetch, Then Merge

Fetch downloads commits from origin that you do not have. Crucially, it does not touch any of your branches — it only updates origin/main, your record of where origin is.

That separation is deliberate: fetch lets you see what other people did before deciding what to do about it.

Once you have looked, merging origin/main is how you actually combine their work with yours. Doing both at once is what pull is.

Exercises

  1. Exercise 1. A teammate pushed c5 while you were working on c1. Download their work, then combine it with yours.
  2. Exercise 2. This time you have made no commits of your own, so there is nothing to combine. Pull — fetch and merge in one command — and watch it fast-forward.