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.
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.
git fetch origin
fetch data only from origin
, and git fetch --all
fetch data from all remotes (origin
is one of them)
git fetch --all
--all
Fetch all remotes.
If you want to get all the data and on the same time also to remove the
deleted data add the --prune
flag
# Fetch all data, remove dangling objects and pack you repository
git fetch --all --prune=now
Your repository may have one remote point known by alias as 'origin', but you may also have other remotes configured. The latter command would fetch from them all.
More in the docs for fetch.