Reputation: 8151
There really is no difference between clone and pull is my understanding. Or in other words git clone -- bare
and git pull
does the same. But since git clone --mirror
updates the local references would it be different from pull ?
EDIT: I mistakenly assumed git clone default is --bare. But --bare will be setup without working directory.
Upvotes: 3
Views: 216
Reputation: 488193
git clone
creates a new repository. You had no repository before, and now you have one.
git pull
does operations in an existing repository.
That seems like a really big difference!
Other than that, what git pull
does is:
git fetch
, thenSince a --mirror
clone is a --bare
clone and therefore has no work-tree, the second command that git pull
would run will fail, no matter whether you choose merge or rebase.
What git fetch
does is documented. With a mirror clone, the default refspec is +refs/*:refs/*
, so that all references are replaced with those obtained from the other Git.
Upvotes: 4