Get updates: fetch and pull
Lesson 18 of 24 · Git.Micro
Your teammates push to the same server. To work on top of their changes, bring them into your copy.
git fetch downloads new commits and updates origin/main, without touching your files.
git pull is a fetch followed by a merge of origin/main into your branch.
Pull before you start working, and you'll have fewer conflicts.
Check yourself
What's the difference between git fetch and git pull?
Fetch only downloads; pull downloads and merges into your branch
Ana pushed new commits to the shared repository. Bring them into your main.
Do it in the browser: a real Git tool, a short mission and instant feedback. No install.
Start this lesson — free