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()
.