libgit2

git_checkout_index

Version:

Updates files in the working tree to match the content of the index.

Signature

int git_checkout_index(git_repository *repo, git_index *index, const git_checkout_opts *opts);

Parameters

In
repo

repository into which to check out (must be non-bare)

In
index

index to be checked out (or NULL to use repository index)

In
opts

specifies checkout options (may be NULL)

Returns

int

0 on success, GIT_ERROR otherwise (use giterr_last for information about the error)

Versions