TortoiseGit Manual

Clone Repository

This section talks about how to clone a git repository from an existing repository. This operation is used to get a full copy of a remote repository. Cloning a git repository is very simple. At an empty directory, just use the explorer context menu and select Git Clone....

The Clone Dialog will show.

Figure 2.7. Clone dialog

Clone dialog

URL: Input repository URL address, which you will clone from. You can click Browse to browse directory.

Directory: Input your local directory, which you will clone to. You can click Browse to browse directory.

Depth: Create a shallow clone with a limited history cut at the specified number of commits.

Recursive: Submodules are initialized and cloned using their default settings.

Clone into Bare Repo: Clone into a bare Git repository without a working tree.

No Checkout: No checkout of HEAD is performed after cloning is completed. This will result in an empty working tree.

Branch: Instead of pointing the newly created HEAD to the cloned repository’s HEAD, point to the specified branch instead.

Origin Name: Instead of using the remote name "origin" (default) to keep track of the upstream repository, use the specified name.

LFS: Use Git LFS (Large File Storage) - this option is only available if Git LFS is installed.

If you check the Load Putty Key checkbox, clone will auto load putty key file with Pageant. You can click ... to browse for a putty key file.

Clone will checkout current HEAD to work space automatically.

Git clone supports HTTP, Git and SSH protocol. the section called “Network Settings” shows how to choose SSH client. OpenSSH, Plink or TortoiseGitPlink.

You can find more information at the section called “git-clone(1)”