Make the repository HEAD directly point to the Commit.
If the provided committish cannot be found in the repository, the HEAD is unaltered and git_error_code.GIT_ENOTFOUND is returned.
If the provided commitish cannot be peeled into a commit, the HEAD is unaltered and -1 is returned.
Otherwise, the HEAD will eventually be detached and will directly point to the peeled Commit.
Repository pointer
Object id of the Commit the HEAD should point to
0 on success, or an error code
See Implementation
Make the repository HEAD directly point to the Commit.
If the provided committish cannot be found in the repository, the HEAD is unaltered and git_error_code.GIT_ENOTFOUND is returned.
If the provided commitish cannot be peeled into a commit, the HEAD is unaltered and -1 is returned.
Otherwise, the HEAD will eventually be detached and will directly point to the peeled Commit.