Detach the HEAD.
If the HEAD is already detached and points to a Commit, 0 is returned.
If the HEAD is already detached and points to a Tag, the HEAD is updated into making it point to the peeled Commit, and 0 is returned.
If the HEAD is already detached and points to a non commitish, the HEAD is unaltered, and -1 is returned.
Otherwise, the HEAD will be detached and point to the peeled Commit.
0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing branch or an error code