What is the difference between 'git pull' and 'git fetch'?
Published
27 Dec 2022
TLDR;
git fetch is similar to pull but doesn't automatically merge; it fetches remote updates, but your local stays the same.
git pull pulls down from a remote and instantly merges with your local.
Fundamentals
If you're new to Git, you're probably confused by the difference between git pull and git fetch. They seem to do similar things but aren't exactly the same.
Git is a distributed version control system. Your local repository is identical to any other remote Git repository, including those found on GitHub and your coworker's machine.
Remote repositories are referenced in your local repository as remote tracking-branches that are linked to there upstream remotes source. To make sure they accurately represent the state of the remote repository, you are not able to modify (move) them directly, Git will do this for you.
To apply changes from a remote repository to your own local working copy, you need first to update your local remote-tracking branch and then apply the changes to your local working branch. To do this, you need to use the git merge, or the git rebase command.
This is particularly important as changes from a remote may break your local working branch, and my need to be applied with your input.
git fetch
git fetch brings your local remote-tracking branches up-to-date with its remote version.
The git fetch operation is safe to run at any time since it never changes any of your local working branches. You will need to use git merge or git rebase to do this.
git pull
git pull brings a local remote-tracking branch up-to-date with its remote version while also attempting to automatically update your own local working branch.
git pull automatically merges the commits without letting you review them first. You may run into frequent conflicts and issues if you are not careful.
Why shouldn't you use git pull?
git pull isn't bad if used properly. The pull command combines two commands, git fetch and git merge. This is safe if your local branch is in sync with the remote branch. If it's not, git pull can modify your local working branch in unpredictable ways and introduces unnecessary nonlinearities in the history.
It's generally preferred to use git fetch followed by git rebase. Git fetch beings down the local changes without applying them to your working branch and git rebase re-writes the history by creating brand new commits for each commit in the local working branch and allows you to apply changes safely.
Similar articles

Production Agentic AI: Permissions, Observability, and Kill Switches
Putting an agentic AI system into production is a different engineering problem to putting it into staging. Once it is live, the governance question shifts from "will it behave?" to "how do we know if it stops behaving, and what do we do about it?" A practical guide to production permissions, observability architecture, and kill switches for Australian engineering leaders in regulated industries.
25 Sept 2026

What Australian CTOs Should Put in the AI Governance Pack
The board is asking. The regulator is watching. The CTO is the one who has to translate "AI governance" from a policy concept into a document set that actually governs something. Here is what a credible AI governance pack looks like for an Australian organisation in 2026, and what each section needs to do to survive scrutiny.
21 Sept 2026

Governing Agentic AI: Human-in-the-Loop Patterns When Tools Can Act (MCP Edition)
Agentic AI doesn't just recommend. It acts. That changes governance from a policy question into an engineering question: which patterns actually limit blast radius, satisfy a human reviewer, and survive scrutiny from a regulator or court? A practical playbook for MCP-connected agents, with a checklist for regulated industries.
16 Sept 2026

Vercel Can Do WebSockets Now. Here's Where a Chat Room Still Breaks It.
Vercel shipped native WebSocket support in 2026, so a Function really can hold a socket open. But the connection is still a function invocation with a duration ceiling and no fan-out. Here's where that's fine for a chat app, where it isn't, and how Supabase Realtime covers the gap.
15 Aug 2026
