Pulling vs. fetching in Git

David Y.
jump to solution

The Problem

What is the difference between git pull and git fetch?

The Solution

The git fetch command updates the remote tracking branches in a repository. In other words, it pulls the latest versions of the remote repository’s branches without applying any changes to local branches.

The git pull command performs a git fetch and then a git merge or git-rebase on the current branch in the local repository. In other words, it updates the repository’s remote-tracking branches and then brings the current local branch up to date with its remote version.

Resolve merge conflicts in Git
David Y.
Rename a local Git branch
David Y.
Revert a Git repository to a previous commit
David Y.

Considered "not bad" by 4 million developers and more than 150,000 organizations worldwide, Sentry provides code-level observability to many of the world's best-known companies like Disney, Peloton, Cloudflare, Eventbrite, Slack, Supercell, and Rockstar Games. Each month we process billions of exceptions from the most popular products on the internet.

Sentry