Git fetch origin vs git fetch --all

Tony Scialo picture Tony Scialo · Apr 14, 2016 · Viewed 14.5k times · Source

What is the difference between the following git commands?

git fetch origin

and

git fetch --all

Running them from the command line looks like they do the same thing.

Answer

Matias Elorriaga picture Matias Elorriaga · Apr 14, 2016

git fetch origin fetch data only from origin, and git fetch --all fetch data from all remotes (origin is one of them)