libgit2

git_clone_into

Version:

Clone into a repository

After creating the repository and remote and configuring them for paths and callbacks respectively, you can call this function to perform the clone operation and optionally checkout files.

Signature

int git_clone_into(git_repository *repo, git_remote *remote, const git_checkout_opts *co_opts, const char *branch);

Parameters

In
repo

the repository to use

In
remote

the remote repository to clone from

In
co_opts

options to use during checkout

const char *
In
branch

the branch to checkout after the clone, pass NULL for the remote's default branch

Returns

int

0 on success or an error code

Versions