git clone origin-url
is primarily used to point to an existing repo and make a clone or copy of that repo at in a new directory. It has its own history
, manages its own files
, and is a completely isolated
environment from the original repository.
git clone --base origin-url
makes a copy of the remote repository with an omitted
working directory. Also the branch heads
at the remote are copied directly to corresponding local branch heads, without mapping
. Neither remote-tracking branches nor the related configuration variables are created.
git clone --mirror origin-url
will clone all the extended refs
of the remote repository, and maintain
remote branch tracking configuration. All local references
(including remote-tracking branches
, notes
etc.) will be overwritten each time you fetch, so it will always be the same as the original repository.