Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

git clone

jlee-tessik edited this page Jun 11, 2015 · 3 revisions

git-clone

Clone a repository into a new directory

####Git

$ git clone https://github.com/libgit2/libgit2sharp.git
```
#### LibGit2Sharp
```csharp
Repository.Clone("https://github.com/libgit2/libgit2sharp.git", "path/to/repo");
```
To provide a username and password, pass in CloneOptions.
```csharp
var co = new CloneOptions();
co.CredentialsProvider = (_url, _user, _cred) => new UsernamePasswordCredentials { Username = "Username", Password = "Password" };
Repository.Clone("https://github.com/libgit2/libgit2sharp.git", "path/to/repo", co);
```

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.