git fetch vs git pull — What's the Difference?

git fetch downloads new commits and branches from a remote without changing any of your local branches, letting you review changes before merging.

Published September 27, 2026

git fetch downloads new commits and branches from a remote without changing any of your local branches, letting you review changes before merging.

Key points

  • Updates your local copy of remote-tracking branches (like origin/main) without touching your own main
  • Safe to run at any time since it never modifies your working directory or current branch
  • Follow it with git merge origin/main (or git log origin/main) to review and then integrate the changes

Example

git fetch origin
More Git articles