Skip to main content
6 of 25
Clarified answer, because as it was previously worded, it wasn't quite clear and correct.
user avatar
user avatar

In the simplest terms, git pull does a git fetch followed by a git merge.

You can do a git fetch at any time to update your remote-tracking branches under refs/remotes/<remote>/. This operation never changes any of your own local branches under refs/heads, and is safe to do without changing your working copy. I have even heard of people running git fetch periodically in a cron job in the background (although I wouldn't recommend doing this).

A git pull is what you would do to bring a local branch up-to-date with its remote version, while also updating your other remote-tracking branches.

Greg Hewgill
  • 1.0m
  • 193
  • 1.2k
  • 1.3k