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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With