Git Clone Repository

   

The Git Clone Repository action allows you to clone an existing repository into a new directory.

From the Git Repository tab select the local repository where you want to clone the existing repository into. If you have already specified a default local repository via Tools > Options > Git, then you can enable the Use defaults option to use this repository. Otherwise,  you can override the default local repository by enabling the Override defaults option and specifying an alternative in the field provided.

The destination directory cannot already contain a repository, otherwise the command will fail.

To clone a remote repository,  you need to specify the location of the repository to clone from, either by using the default remote repository (if specified) or overriding the default value.

Git_GitRepository

To clone a local repository switch to the Clone Repository tab and check the Clone a local repository option select the directory of the local repository to clone.

If both a local and a remote source repository are provided then the local repository will be cloned. Ensure that the Clone a local repository option is unchecked when attempting to clone a remote repository.

Git_Clone

There are a number of options that can be executed with this action:

Quiet - Suppress output from Git.

Verbose - Verbose output from Git.

No hard links - When cloning a local repository, optimise the process by copying the files under .git/objects. Only enabled when cloning a local repository.

Shared - When cloning from a local repository , don't setup hard links, instead setup .git/objects/info/alternates to share objects with the source repository.  Only enabled when cloning a local repository.

No checkout - Do not checkout the HEAD once the clone has completed.

Bare - Rather than place the administrative files in <Destination Directory>/.git place all the files in the <Destination Directory>. (Implies No checkout option).

Mirror - Creates a mirror of the remote repository (implies Bare option).

Depth - Limit the resulting repository to the specified number of revisions to create a shallow repository. Note: Shallow repositories have a number of limitations that users should be aware of before using this option.

Reference Repository - This options allows you to copy .git/objects/info/alternatives from the repository located in the specified directory.

Template Directory - Specify the directory to copy the templates from (override the default of

<Git Installation Directory>/share/git-core/templates/).

For more information on cloning a git repository, see: git clone