libgit2

git_reset_from_annotated

Version:

Sets the current head to the specified commit oid and optionally resets the index and working tree to match.

This behaves like git_reset() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.

See the documentation for git_reset().

See

Signature

int git_reset_from_annotated(git_repository *repo, const git_annotated_commit *commit, git_reset_t reset_type, const git_checkout_options *checkout_opts);

Parameters

Returns

int

Versions