Make the repository HEAD point to the specified reference.
If the provided reference points to a Tree or a Blob, the HEAD is
unaltered and -1 is returned.
If the provided reference points to a branch, the HEAD will point
to that branch, staying attached, or become attached if it isn't yet.
If the branch doesn't exist yet, no error will be return. The HEAD
will then be attached to an unborn branch.
Otherwise, the HEAD will be detached and will directly point to
the Commit.
Make the repository HEAD point to the specified reference.
If the provided reference points to a Tree or a Blob, the HEAD is unaltered and -1 is returned.
If the provided reference points to a branch, the HEAD will point to that branch, staying attached, or become attached if it isn't yet. If the branch doesn't exist yet, no error will be return. The HEAD will then be attached to an unborn branch.
Otherwise, the HEAD will be detached and will directly point to the Commit.