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_options *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, non-zero return value from notify_cb, or error code < 0 (use git_error_last for error details)

Versions