libgit2

git_reset_default

Version:

Updates some entries in the index from the target commit tree.

The scope of the updated entries is determined by the paths being passed in the pathspec parameters.

Passing a NULL target will result in removing entries in the index matching the provided pathspecs.

Signature

int git_reset_default(git_repository *repo, const git_object *target, const git_strarray *pathspecs);

Parameters

In
repo

Repository where to perform the reset operation.

In
target

The committish which content will be used to reset the content of the index.

In
pathspecs

List of pathspecs to operate on.

Returns

int

0 on success or an error code < 0

Versions